mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 02:18:00 +02:00
fix(cfg): parser bugs on missing final newline
This commit is contained in:
@@ -66,7 +66,8 @@ int read_desktop(FILE* fd, void* ctx,
|
|||||||
buf_start[eq_idx] = '\0'; // the equal
|
buf_start[eq_idx] = '\0'; // the equal
|
||||||
key = trim_str(key);
|
key = trim_str(key);
|
||||||
char* value = &buf_start[eq_idx + 1];
|
char* value = &buf_start[eq_idx + 1];
|
||||||
buf_start[read_size - 1] = '\0'; // the newline
|
if(buf_start[read_size - 1] == '\n')
|
||||||
|
buf_start[read_size - 1] = '\0';
|
||||||
value = trim_str(value);
|
value = trim_str(value);
|
||||||
|
|
||||||
// Callback
|
// Callback
|
||||||
|
Reference in New Issue
Block a user