diff --git a/libfreerdp/cache/glyph.c b/libfreerdp/cache/glyph.c index 3fcbe77ef..799b73dc7 100644 --- a/libfreerdp/cache/glyph.c +++ b/libfreerdp/cache/glyph.c @@ -48,6 +48,7 @@ void update_process_glyph(rdpContext* context, BYTE* data, int* index, if ((ulCharInc == 0) && (!(flAccel & SO_CHAR_INC_EQUAL_BM_BASE))) { + /* Contrary to fragments, the offset is added before the glyph. */ (*index)++; offset = data[*index]; @@ -111,6 +112,12 @@ void update_process_glyph_fragments(rdpContext* context, BYTE* data, UINT32 leng if (fragments != NULL) { + for (n = 0; n < (int) size; n++) + { + update_process_glyph(context, fragments, &n, &x, &y, cacheId, ulCharInc, flAccel); + } + + /* Contrary to glyphs, the offset is added after the fragment. */ if ((ulCharInc == 0) && (!(flAccel & SO_CHAR_INC_EQUAL_BM_BASE))) { if (flAccel & SO_VERTICAL) @@ -118,11 +125,6 @@ void update_process_glyph_fragments(rdpContext* context, BYTE* data, UINT32 leng else x += data[index + 2]; } - - for (n = 0; n < (int) size; n++) - { - update_process_glyph(context, fragments, &n, &x, &y, cacheId, ulCharInc, flAccel); - } } index += (index + 2 < (int) length) ? 3 : 2; diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index de082bc75..2e97d059d 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -798,6 +798,7 @@ void nego_process_negotiation_failure(rdpNego* nego, wStream* s) case SSL_NOT_ALLOWED_BY_SERVER: DEBUG_NEGO("Error: SSL_NOT_ALLOWED_BY_SERVER"); + nego->sendNegoData = TRUE; break; case SSL_CERT_NOT_ON_SERVER: @@ -940,6 +941,7 @@ void nego_init(rdpNego* nego) nego->transport->ReceiveCallback = nego_recv; nego->transport->ReceiveExtra = (void*) nego; nego->cookie_max_length = DEFAULT_COOKIE_MAX_LENGTH; + nego->sendNegoData = FALSE; nego->flags = 0; }