浏览代码

REVIEWED: TextFormat() #1626

Ray 4 年之前
父节点
当前提交
ca22a87949
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/text.c

+ 1 - 1
src/text.c

@@ -1175,7 +1175,7 @@ const char *TextFormat(const char *text, ...)
 
 
     va_list args;
     va_list args;
     va_start(args, text);
     va_start(args, text);
-    vsprintf(currentBuffer, text, args);
+    vsnprintf(currentBuffer, MAX_TEXT_BUFFER_LENGTH, text, args);
     va_end(args);
     va_end(args);
 
 
     index += 1;     // Move to next buffer for next function call
     index += 1;     // Move to next buffer for next function call