summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2013-12-22 01:23:17 +0100
committerOlivier Gayot <duskcoder@gmail.com>2014-01-18 13:44:25 +0100
commit646515d288da8aec7dc266f7d30047320b271742 (patch)
treed0713da15a09decad142a0d287badcf9f09cf8e4
parentffcd1f19269c30fdec2a8db3756e4d0b84e815b1 (diff)
rb: fix a dangerous comment
we provided an example to show how to use rb_gets2 but did not NULL-terminate our array of delimiters.
-rw-r--r--rb_str.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rb_str.h b/rb_str.h
index f48d685..bbfef5e 100644
--- a/rb_str.h
+++ b/rb_str.h
@@ -26,7 +26,7 @@ char *rb_gets(t_rb *rb, const char *delim);
* the longest will be discarded
*
* common use case:
- * request = rb_gets(rb, (const char *[]){"\n", "\r", "\r\n"})
+ * request = rb_gets(rb, (const char *[]){"\n", "\r", "\r\n", NULL})
* which will return a request disregarding whether netcat or telnet is used
*/
char *rb_gets2(t_rb *rb, const char *const *delim);