summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/string/strcspn/gstrcspna.c
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/string/strcspn/gstrcspna.c')
-rw-r--r--2.3-1/src/c/string/strcspn/gstrcspna.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/2.3-1/src/c/string/strcspn/gstrcspna.c b/2.3-1/src/c/string/strcspn/gstrcspna.c
index b611fff8..2c83c724 100644
--- a/2.3-1/src/c/string/strcspn/gstrcspna.c
+++ b/2.3-1/src/c/string/strcspn/gstrcspna.c
@@ -16,11 +16,11 @@ uint8 gstrcspna(char *str1,int size1,char *str2,int size2)
{
int ind,i,j;
- for(i=0;i<=size1;i++)
+ for(i=0;i<=size2;i++)
{
- for(j=0;j<=size2;j++)
+ for(j=0;j<=size1;j++)
{
- if(str2[j]==str1[i])
+ if(str2[i]==str1[j])
{
ind=j;
break;