Fix a couple of bugs
This commit is contained in:
parent
16403f14ad
commit
d5d61a8cc6
@ -1022,7 +1022,7 @@ tryagain:
|
||||
}
|
||||
|
||||
void do_logout() {
|
||||
char buffer[256];
|
||||
char buffer[PATH_MAX];
|
||||
struct stat s;
|
||||
lua_State *L;
|
||||
int ret = 0;
|
||||
|
@ -10,7 +10,7 @@ char **strings;
|
||||
int string_count;
|
||||
|
||||
void chomp(char *string) {
|
||||
while ((string[strlen(string)-1] == '\r' || string[strlen(string)-1] == '\n') && strlen(string)) {
|
||||
while (strlen(string) && (string[strlen(string)-1] == '\r' || string[strlen(string)-1] == '\n')) {
|
||||
string[strlen(string)-1] = '\0';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user