File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ static void *Task_Ready;
112
112
if (spot ) {
113
113
// Save rest of cmd line (such as end quote, -flags, etc.)
114
114
COPY_STR (hold , spot + 2 , HOLD_SIZE );
115
+ hold [HOLD_SIZE ] = 0 ;
115
116
116
117
// Terminate at the arg location:
117
118
spot [0 ] = 0 ;
@@ -454,6 +455,7 @@ static void *Task_Ready;
454
455
if (!ok ) COPY_STR (str , TEXT ("unknown error" ), len );
455
456
else {
456
457
COPY_STR (str , lpMsgBuf , len );
458
+ str [len ] = 0 ;
457
459
len = (int )LEN_STR (str );
458
460
if (str [len - 2 ] == '\r' && str [len - 1 ] == '\n' ) str [len - 2 ] = 0 ; // trim CRLF
459
461
LocalFree (lpMsgBuf );
@@ -556,7 +558,7 @@ static void *Task_Ready;
556
558
REBCHR * str ;
557
559
558
560
str = env ;
559
- while (n = (REBCNT )LEN_STR (str )) {
561
+ while (( n = (REBCNT )LEN_STR (str ) )) {
560
562
len += n + 1 ;
561
563
str = env + len ; // next
562
564
}
You can’t perform that action at this time.
0 commit comments