Bläddra i källkod

Fixed SDL_iconv_string() truncation when handling SDL_ICONV_E2BIG

Sam Lantinga 2 år sedan
förälder
incheckning
c369b90019
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      src/stdlib/SDL_iconv.c

+ 2 - 1
src/stdlib/SDL_iconv.c

@@ -828,7 +828,8 @@ char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inb
             outbuf = string + (outbuf - oldstring);
             outbuf = string + (outbuf - oldstring);
             outbytesleft = stringsize - (outbuf - string);
             outbytesleft = stringsize - (outbuf - string);
             SDL_memset(outbuf, 0, 4);
             SDL_memset(outbuf, 0, 4);
-        } break;
+            continue;
+        }
         case SDL_ICONV_EILSEQ:
         case SDL_ICONV_EILSEQ:
             /* Try skipping some input data - not perfect, but... */
             /* Try skipping some input data - not perfect, but... */
             ++inbuf;
             ++inbuf;