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:
turbocat
2021-07-24 21:28:39 +00:00
parent 2976cecf4e
commit 8fa851ddb6
3 changed files with 8 additions and 15 deletions

View File

@@ -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;
}
}