mirror of
https://git.code.sf.net/p/zint/code
synced 2024-09-19 23:39:02 -04:00
Extend string 1 byte to accommodate terminator
This commit is contained in:
parent
dc21ca1190
commit
4a31544645
1 changed files with 2 additions and 2 deletions
|
@ -485,9 +485,9 @@ int png_plot(struct zint_symbol *symbol, int rotate_angle)
|
||||||
int scaler = (int)(2 * symbol->scale);
|
int scaler = (int)(2 * symbol->scale);
|
||||||
int default_text_posn;
|
int default_text_posn;
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
unsigned char local_text[ustrlen(symbol->text)];
|
unsigned char local_text[ustrlen(symbol->text) + 1];
|
||||||
#else
|
#else
|
||||||
unsigned char* local_text = (unsigned char*)_alloca(ustrlen(symbol->text));
|
unsigned char* local_text = (unsigned char*)_alloca(ustrlen(symbol->text) + 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
to_latin1(symbol->text, local_text);
|
to_latin1(symbol->text, local_text);
|
||||||
|
|
Loading…
Reference in a new issue