瀏覽代碼

Fixed SDL_iconv_string() truncation when handling SDL_ICONV_E2BIG

(cherry picked from commit c369b900199f905c51edb372bd7780f67a544a8c)
Sam Lantinga 2 年之前
父節點
當前提交
7c86d96e86
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/stdlib/SDL_iconv.c

+ 2 - 1
src/stdlib/SDL_iconv.c

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