Happy helping ☃ is here to help you with spurious tabs. - geomyidae - A small C-based gopherd. HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit a008a6b5af9fa5fb95ea950b72196548816990c4 DIR parent 157431d0ab6a420c93d1f188a3042d3f2252ebfb HTML Author: Christoph Lohmann <20h@r-36.net> Date: Tue, 10 Oct 2017 20:39:51 +0200 Happy helping ☃ is here to help you with spurious tabs. Diffstat: M ind.c | 15 +++++++++++++++ M index.gph | 1 + 2 files changed, 16 insertions(+), 0 deletions(-) --- DIR diff --git a/ind.c b/ind.c @@ -239,7 +239,22 @@ getadv(char *str) char *b, *e, *o, *bo; Elems *ret; + ret = xcalloc(1, sizeof(Elems)); + + if (strchr(str, '\t')) { + addelem(ret, "i"); + addelem(ret, "Happy helping ☃ here: You tried to " + "output a spurious tab character. This will " + "break gopher. Please review your scripts. " + "Have a nice day!"); + addelem(ret, "Err"); + addelem(ret, "server"); + addelem(ret, "port"); + + return ret; + } + if (str[0] == '[') { o = xstrdup(str); b = o + 1; DIR diff --git a/index.gph b/index.gph @@ -4,4 +4,5 @@ tcomment [0|file - comment|/file.dat|server|port] [h|http://www.heise.de|URL:http://www.heise.de|server|port] [0|some \| escape and [ special characters ] test|error|server|port] +some invalid line