aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/mpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mps/code/mpm.c')
-rw-r--r--mps/code/mpm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mps/code/mpm.c b/mps/code/mpm.c
index 0930be4c6d3..247cbd05a56 100644
--- a/mps/code/mpm.c
+++ b/mps/code/mpm.c
@@ -226,7 +226,8 @@ Bool ResIsAllocFailure(Res res)
226static Res WriteWord(mps_lib_FILE *stream, Word w, unsigned base, 226static Res WriteWord(mps_lib_FILE *stream, Word w, unsigned base,
227 unsigned width) 227 unsigned width)
228{ 228{
229 static const char digit[16] = "0123456789ABCDEF"; 229 static const char digit[16 + 1] = "0123456789ABCDEF";
230 /* + 1 for terminator: unused, but prevents compiler warning */
230 static const char pad = '0'; /* padding character */ 231 static const char pad = '0'; /* padding character */
231 char buf[MPS_WORD_WIDTH + 1]; /* enough for binary, */ 232 char buf[MPS_WORD_WIDTH + 1]; /* enough for binary, */
232 /* plus one for terminator */ 233 /* plus one for terminator */