From cb2132274539d1cf57000f373b76fd97b33f6a2d Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 3 May 2013 12:45:15 -0700 Subject: [PATCH] Fix wrong location value for collisions. --- protocols/ssh/src/display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocols/ssh/src/display.c b/protocols/ssh/src/display.c index 3e7ddbcf..5e220276 100644 --- a/protocols/ssh/src/display.c +++ b/protocols/ssh/src/display.c @@ -159,12 +159,13 @@ int __guac_terminal_get_glyph(guac_terminal_display* display, int codepoint) { /* If something already stored here, either same codepoint or collision */ if (display->glyphs[hashcode].location) { + location = display->glyphs[hashcode].location - 1; + /* If match, return match. */ if (display->glyphs[hashcode].codepoint == codepoint) - return display->glyphs[hashcode].location - 1; + return location; /* Otherwise, reuse location */ - location = display->glyphs[hashcode].location; }