mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 14:58:50 +00:00
Fixed ugly bug in runtime (.string)
This commit is contained in:
parent
be89ee983a
commit
6e36efbec9
1 changed files with 2 additions and 1 deletions
|
|
@ -85,10 +85,11 @@ static void extendStringBuf () {
|
||||||
static void printStringBuf (char *fmt, ...) {
|
static void printStringBuf (char *fmt, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
int written, rest;
|
int written, rest;
|
||||||
char *buf = &stringBuf.contents[stringBuf.ptr];
|
char *buf;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
|
buf = &stringBuf.contents[stringBuf.ptr];
|
||||||
rest = stringBuf.len - stringBuf.ptr;
|
rest = stringBuf.len - stringBuf.ptr;
|
||||||
written = vsnprintf (buf, rest, fmt, args);
|
written = vsnprintf (buf, rest, fmt, args);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue