X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fexception.cxx;h=accd9706c264dc19f2e8d9dd836c7ce9444b10f2;hb=1f6555c9ad3fb75cb474fbf99b46333830285514;hp=821ae3248c373186bc457a6bab306258f7738434;hpb=b633b8d0d3f06a90cf357fdc5a14c8ee25d143d7;p=simgear.git diff --git a/simgear/structure/exception.cxx b/simgear/structure/exception.cxx index 821ae324..accd9706 100644 --- a/simgear/structure/exception.cxx +++ b/simgear/structure/exception.cxx @@ -331,7 +331,7 @@ sg_format_exception::setText (const char* text) { if (text) { strncpy(_text, text, MAX_TEXT_LEN); - _text[MAX_TEXT_LEN] = '\0'; + _text[MAX_TEXT_LEN-1] = '\0'; } else { _text[0] = '\0'; }