From 918e315d47161e0e0d87a4b7c71dc0016d9530b9 Mon Sep 17 00:00:00 2001 From: torsten Date: Thu, 20 Aug 2009 08:32:31 +0000 Subject: [PATCH] Warning fix: array subscript is above array bounds --- simgear/structure/exception.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; } -- 2.39.5