mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Extend string 1 byte to accommodate terminator
This commit is contained in:
parent
dc21ca1190
commit
4a31544645
@ -485,9 +485,9 @@ int png_plot(struct zint_symbol *symbol, int rotate_angle)
|
||||
int scaler = (int)(2 * symbol->scale);
|
||||
int default_text_posn;
|
||||
#ifndef _MSC_VER
|
||||
unsigned char local_text[ustrlen(symbol->text)];
|
||||
unsigned char local_text[ustrlen(symbol->text) + 1];
|
||||
#else
|
||||
unsigned char* local_text = (unsigned char*)_alloca(ustrlen(symbol->text));
|
||||
unsigned char* local_text = (unsigned char*)_alloca(ustrlen(symbol->text) + 1);
|
||||
#endif
|
||||
|
||||
to_latin1(symbol->text, local_text);
|
||||
|
Loading…
x
Reference in New Issue
Block a user