From 1dc99d862fe3178a3a6e72e2c1338000545ec859 Mon Sep 17 00:00:00 2001 From: Ankitr19 Date: Fri, 7 Jul 2017 12:47:56 +0530 Subject: Demos and RPi compiler compatibility --- src/c/string/strcspn/gstrcspna.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/c/string/strcspn/gstrcspna.c') diff --git a/src/c/string/strcspn/gstrcspna.c b/src/c/string/strcspn/gstrcspna.c index b611fff..2c83c72 100644 --- a/src/c/string/strcspn/gstrcspna.c +++ b/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; -- cgit