|
From: <kin...@us...> - 2023-07-07 21:41:00
|
Revision: 7045
http://sourceforge.net/p/teem/code/7045
Author: kindlmann
Date: 2023-07-07 21:40:54 +0000 (Fri, 07 Jul 2023)
Log Message:
-----------
propagating AIR_STRLEN --> AIR_STRLEN+1 change
Modified Paths:
--------------
teem/trunk/src/echo/test/glyph.c
Modified: teem/trunk/src/echo/test/glyph.c
===================================================================
--- teem/trunk/src/echo/test/glyph.c 2023-07-07 21:38:52 UTC (rev 7044)
+++ teem/trunk/src/echo/test/glyph.c 2023-07-07 21:40:54 UTC (rev 7045)
@@ -176,7 +176,7 @@
}
int
-echoParseTenNrrd(void *ptr, char *str, char err[AIR_STRLEN_HUGE]) {
+echoParseTenNrrd(void *ptr, char *str, char err[AIR_STRLEN_HUGE + 1]) {
char me[] = "echoParseTenNrrd", *nerr;
Nrrd **nrrdP;
airArray *mop;
@@ -191,7 +191,7 @@
airMopAdd(mop, *nrrdP, (airMopper)nrrdNuke, airMopOnError);
if (nrrdLoad(*nrrdP, str)) {
airMopAdd(mop, nerr = biffGetDone(NRRD), airFree, airMopOnError);
- if (strlen(nerr) > AIR_STRLEN_HUGE - 1) nerr[AIR_STRLEN_HUGE - 1] = '\0';
+ if (strlen(nerr) > AIR_STRLEN_HUGE) nerr[AIR_STRLEN_HUGE] = '\0';
strcpy(err, nerr);
airMopError(mop);
return 1;
@@ -200,7 +200,7 @@
/* why not use the given err[] as a temp buffer */
biffAddf(TEN, "%s: \"%s\" isn't a valid tensor volume", me, str);
airMopAdd(mop, nerr = biffGetDone(TEN), airFree, airMopOnError);
- if (strlen(nerr) > AIR_STRLEN_HUGE - 1) nerr[AIR_STRLEN_HUGE - 1] = '\0';
+ if (strlen(nerr) > AIR_STRLEN_HUGE) nerr[AIR_STRLEN_HUGE] = '\0';
strcpy(err, nerr);
airMopError(mop);
return 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|