From bc9c2217725fbf4993c7f6e6eb080dc2fc7cf111 Mon Sep 17 00:00:00 2001 From: nutricato Date: Tue, 16 Jun 2009 16:04:20 +0000 Subject: added -1 to take into account /0 character (of string1) in string1+string2 --- src/c/operations/interfaces/int_OpPlus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c/operations/interfaces/int_OpPlus.h b/src/c/operations/interfaces/int_OpPlus.h index 9a385829..cb86d815 100644 --- a/src/c/operations/interfaces/int_OpPlus.h +++ b/src/c/operations/interfaces/int_OpPlus.h @@ -134,9 +134,9 @@ /* Strings */ - +/* RNU: size1[1]-1 -> "-1" because '\0' of the first string must be removed. */ #define g2g2OpPlusg2(in1,size1,in2,size2,out) {int i = 0, j = 0; \ - for(i = 0 ; i < size1[1] ; ++i, ++j) out[j] = in1[i]; \ + for(i = 0 ; i < size1[1]-1 ; ++i, ++j) out[j] = in1[i]; \ for(i = 0 ; i < size2[1] ; ++i, ++j) out[j] = in2[i]; \ } -- cgit