summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringobject.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index c234b04..3a69aa9 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -765,7 +765,11 @@ string_print(PyStringObject *op, FILE *fp, int flags)
return ret;
}
if (flags & Py_PRINT_RAW) {
- fwrite(op->ob_sval, 1, (int) op->ob_size, fp);
+#ifdef __VMS
+ if (op->ob_size) fwrite(op->ob_sval, (int) op->ob_size, 1, fp);
+#else
+ fwrite(op->ob_sval, 1, (int) op->ob_size, fp);
+#endif
return 0;
}