forked from KolibriOS/kolibrios
libc.obj:
strtol.с - removed existing definitions; fgets.c - uses fread() to read; gets.c - added additional check; git-svn-id: svn://kolibrios.org@9081 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -11,6 +11,10 @@ char *gets(char* str)
|
||||
errno = EIO;
|
||||
return NULL;
|
||||
}
|
||||
str[strlen(str)-1]='\0';
|
||||
|
||||
int str_len = strlen(str);
|
||||
if(str[str_len-1]=='\n'){
|
||||
str[str_len-1]='\0';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user