summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/newt/textbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdk-stage1/newt/textbox.c b/mdk-stage1/newt/textbox.c
index 272c9b675..2f2880fe2 100644
--- a/mdk-stage1/newt/textbox.c
+++ b/mdk-stage1/newt/textbox.c
@@ -173,7 +173,7 @@ static void doReflow(const char * text, char ** resultPtr, int width,
while (*text && text < end) {
if (end - text < width) {
if (result) {
- strncat(result, text, end - text + 1);
+ strncat(result, text, end - text);
strcat(result, "\n");
height++;
}
@@ -212,7 +212,7 @@ static void doReflow(const char * text, char ** resultPtr, int width,
chptr++;
kanji = 0;
} else {
- strncat(result, text, chptr - text + 1);
+ strncat(result, text, chptr - text);
}
strcat(result, "\n");
height++;