浏览代码

[MERGE #1025] cross platform: fix FWrite output buffer size

Merge pull request #1025 from obastemur:obastemur_fix_fwrite
Fixes unicode output to file stream.

```
print("ab\u00A0cd");

before fix : ab c
after fix  : ab cd
```
Oguz Bastemur 9 年之前
父节点
当前提交
afdb21b4e2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pal/src/cruntime/printfcpp.cpp

+ 1 - 1
pal/src/cruntime/printfcpp.cpp

@@ -84,7 +84,7 @@ static int Internal_Convertfwrite(CPalThread *pthrCurrent, const void *buffer, s
             InternalFree(newBuff);
             return -1;
         }
-        ret = InternalFwrite(newBuff, 1, count, stream, &iError);
+        ret = InternalFwrite(newBuff, 1, nsize, stream, &iError);
         if (iError != 0)
         {
             ERROR("InternalFwrite did not write the whole buffer. Error is %d\n", iError);