fix strncpy not leaving null terminator space

pull/2077/head
Isaac Connor 2017-12-12 12:52:20 -05:00
parent 2df96bf6ee
commit 43e4421368
1 changed files with 1 additions and 1 deletions

View File

@ -1927,7 +1927,7 @@ void Image::MaskPrivacy( const unsigned char *p_bitmask, const Rgb pixel_colour
/* RGB32 compatible: complete */
void Image::Annotate( const char *p_text, const Coord &coord, const unsigned int size, const Rgb fg_colour, const Rgb bg_colour )
{
strncpy( text, p_text, sizeof(text) );
strncpy( text, p_text, sizeof(text)-1 );
unsigned int index = 0;
unsigned int line_no = 0;