forked from mia/Aegisub
Fix STL header writing (really)
The vsnprintf call must be passed the buffer size, not the target string size. Shortening the string to field length happens in the memcpy.
This commit is contained in:
parent
0e8bc44539
commit
b118fe7e7a
1 changed files with 1 additions and 1 deletions
|
@ -531,7 +531,7 @@ namespace
|
|||
char buf[16];
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vsnprintf(buf, fieldlen, format, ap);
|
||||
vsnprintf(buf, sizeof(buf), format, ap);
|
||||
va_end(ap);
|
||||
memcpy(field, buf, fieldlen);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue