From 3052ef8a1ddfb6d50984e90b3fbcf54edc9dd74b Mon Sep 17 00:00:00 2001 From: Ankitr19 Date: Wed, 12 Jul 2017 20:44:33 +0530 Subject: strcspn error removed --- 2.3-1/jar/scilab_en_US_help.jar | Bin 11210 -> 11210 bytes 2.3-1/src/c/string/strcspn/gstrcspna.c | 27 ++++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/2.3-1/jar/scilab_en_US_help.jar b/2.3-1/jar/scilab_en_US_help.jar index 42fc9ad4..5ab633f5 100644 Binary files a/2.3-1/jar/scilab_en_US_help.jar and b/2.3-1/jar/scilab_en_US_help.jar differ diff --git a/2.3-1/src/c/string/strcspn/gstrcspna.c b/2.3-1/src/c/string/strcspn/gstrcspna.c index 2c83c724..91de8af7 100644 --- a/2.3-1/src/c/string/strcspn/gstrcspna.c +++ b/2.3-1/src/c/string/strcspn/gstrcspna.c @@ -14,19 +14,28 @@ #include "strcspn.h" uint8 gstrcspna(char *str1,int size1,char *str2,int size2) { - int ind,i,j; - for(i=0;i<=size2;i++) + uint8 ind=size1+1; + int l,m; + for(m=0;mtp) + { + ind=tp; + } + } } - } } - return (ind+1); + if(ind==size1+1) + { + ind=size1; + } + return ind; } -- cgit