aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortim.dawborn <tim.dawborn@gmail.com>2011-06-24 09:15:41 +1000
committertim.dawborn <tim.dawborn@gmail.com>2011-06-24 09:15:41 +1000
commitdc4a14a94965057050463f5dd42f7d75280cdecf (patch)
treeecdcbdb1876ebf871ce251812f3786c34a6a299c /tests
parentb67ec228417909709ea67bafc6ef2ede0a9f39e9 (diff)
parent67edb0096dd6f4d07c604834679dbfd1337e4c50 (diff)
Merge remote branch 'upstream/master'
Diffstat (limited to 'tests')
-rw-r--r--tests/files.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/files.cpp b/tests/files.cpp
index 202c03bb..39f9e61a 100644
--- a/tests/files.cpp
+++ b/tests/files.cpp
@@ -52,7 +52,8 @@ int main()
FILE *other = fopen("test.file", "r");
assert(other);
char otherData[1000];
- fread(otherData, 1, 10, other);
+ num = fread(otherData, 1, 9, other);
+ otherData[num] = 0;
fclose(other);
printf("other=%s.\n", otherData);