From 5e09041d8b54087ff00b00a34424f43af63a0c36 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 23 Sep 2006 16:05:41 +0000 Subject: [PATCH] bug: even empty strings need to be terminated. --- xwords4/common/strutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/common/strutils.c b/xwords4/common/strutils.c index 56c3155a6..bb1c5aca2 100644 --- a/xwords4/common/strutils.c +++ b/xwords4/common/strutils.c @@ -122,8 +122,8 @@ stringFromStreamHere( XWStreamCtxt* stream, XP_UCHAR* buf, XP_U16 buflen ) len = buflen - 1; } stream_getBytes( stream, buf, len ); - buf[len] = '\0'; } + buf[len] = '\0'; return len; }