diff options
author | nutricato | 2009-06-16 16:04:20 +0000 |
---|---|---|
committer | nutricato | 2009-06-16 16:04:20 +0000 |
commit | bc9c2217725fbf4993c7f6e6eb080dc2fc7cf111 (patch) | |
tree | f9833fa9befefb241deb7e30e581752346109f7d | |
parent | ac39315f7bdbabc5c41b54eec8d0e97f0943abba (diff) | |
download | scilab2c-bc9c2217725fbf4993c7f6e6eb080dc2fc7cf111.tar.gz scilab2c-bc9c2217725fbf4993c7f6e6eb080dc2fc7cf111.tar.bz2 scilab2c-bc9c2217725fbf4993c7f6e6eb080dc2fc7cf111.zip |
added -1 to take into account /0 character (of string1) in string1+string2
-rw-r--r-- | src/c/operations/interfaces/int_OpPlus.h | 4 |
1 files 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]; \ } |