New version with different parameter passing mechanism and some
minor fixes
This commit is contained in:
@@ -152,9 +152,11 @@ GetString(upto)
|
||||
}
|
||||
}
|
||||
str->s_length = p - str->s_str;
|
||||
*p = '\0';
|
||||
str->s_str = Realloc(str->s_str,
|
||||
(unsigned)((str->s_length+(int)word_size) & ~((int)word_size-1)));
|
||||
len = (str->s_length+(int)word_size) & ~((int)word_size-1);
|
||||
while (p - str->s_str < len) {
|
||||
*p++ = '\0';
|
||||
}
|
||||
str->s_str = Realloc(str->s_str, (unsigned) len);
|
||||
if (str->s_length == 0) str->s_length = 1;
|
||||
/* ??? string length at least 1 ??? */
|
||||
return str;
|
||||
|
||||
Reference in New Issue
Block a user