in case the length is 0 don't decrement the lenght
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@877 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.8
parent
2d7b1e0227
commit
269ccc70c8
|
@ -119,8 +119,8 @@ int light_isalnum(int c);
|
|||
#define BUFFER_APPEND_SLASH(x) \
|
||||
if (x->used > 1 && x->ptr[x->used - 2] != '/') { BUFFER_APPEND_STRING_CONST(x, "/"); }
|
||||
|
||||
#define CONST_STR_LEN(x) x, sizeof(x) - 1
|
||||
#define CONST_BUF_LEN(x) x->ptr, x->used - 1
|
||||
#define CONST_STR_LEN(x) x, x ? sizeof(x) - 1 : 0
|
||||
#define CONST_BUF_LEN(x) x->ptr, x->used ? x->used - 1 : 0
|
||||
|
||||
|
||||
#define SEGFAULT() do { fprintf(stderr, "%s.%d: aborted\n", __FILE__, __LINE__); abort(); } while(0)
|
||||
|
|
Loading…
Reference in New Issue