projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fixup
[lcr.git]
/
macro.h
diff --git
a/macro.h
b/macro.h
index
08c8a9b
..
8d904df
100644
(file)
--- a/
macro.h
+++ b/
macro.h
@@
-115,6
+115,8
@@
static inline char *_getline(char *buffer, int size, FILE *fp)
return buffer;
if (buffer[strlen(buffer)-1] == '\n')
buffer[strlen(buffer)-1] = '\0';
+ if (!buffer[0])
+ return buffer;
if (buffer[strlen(buffer)-1] == '\r')
buffer[strlen(buffer)-1] = '\0';
return buffer;