diff options
author | epochqwert <epoch@hacking.allowed.org> | 2017-03-19 04:54:31 +0000 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2017-03-19 04:54:31 +0000 |
commit | 6dd1dc8187326b09ccdf051cb632016a03b3f7b6 (patch) | |
tree | 9265c3f44e5e0fa28416251819bb63f0dbde3de0 /segfault.c | |
parent | 991dced81da59a793a5cf709205f7c097d9499ad (diff) | |
download | segfault-6dd1dc8187326b09ccdf051cb632016a03b3f7b6.tar.gz segfault-6dd1dc8187326b09ccdf051cb632016a03b3f7b6.zip |
fixed the lambda stuff
Diffstat (limited to 'segfault.c')
-rw-r--r-- | segfault.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -20,7 +20,7 @@ #define RECURSE_LIMIT 10 -#define free(a) do{printf("freeing %p line:%d\n",(void *)a,__LINE__);if(a) free(a);}while(0); +//#define free(a) do{printf("freeing %p line:%d\n",(void *)a,__LINE__);if(a) free(a);}while(0); /*// just in case your system doesn't have strndup char *strndup(char *s,int l) { @@ -1094,19 +1094,15 @@ void message_handler(int fd,char *from,struct user *user,char *msg,int redones) if(!strncmp(command,"s/",2)) { command[1]=' '; } + while(!strncmp(command,"lambda ",7)) { + command+=7; + command=format_magic(fd,from,user,command,command); + lambdad=1; + } if((args=strchr(command,' '))) { *args=0; args++; } - while(!strncmp(command,"lambda",6)) { - command+=7; - if((args=strchr(command,' '))) { - *args=0; - args++; - } - args=format_magic(fd,from,user,args,args); - lambdad=1; - } if((lol.data=ht_getvalue(&builtin,command))) { func=lol.func; func(fd,from,args,user); |