Fixed some warnings. Patch by Torbjorn Andersson.

This commit is contained in:
Giulio Camuffo 2011-04-05 21:45:20 +02:00
parent e6421b17f6
commit 66bba94bcf
3 changed files with 10 additions and 6 deletions

View file

@ -66,7 +66,7 @@ void TextObject::setText(const char *text) {
// this should be good enough to still be unique
// but for debug purposes lets make this crash the program so we know about it
strncpy(_textID, text, sizeof(_textID));
_textID[sizeof(_textID)] = 0;
_textID[sizeof(_textID) - 1] = 0;
}
}