summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uriunescape.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/uriunescape.c b/uriunescape.c
index c99cdfc..23800a5 100644
--- a/uriunescape.c
+++ b/uriunescape.c
@@ -9,12 +9,14 @@ int main(int argc,char *argv[]) {
int len;
char buf[BUFSIZE];
char buf2[BUFSIZE];
+ char *ab;
int blen;
int hack;
if(argc > 1) {
for(argv++,argc--;argc;argc--,argv++) {
- len=uriunescape(*argv,*argv);
- write(1,*argv,len);
+ ab=malloc(strlen(*argv));
+ len=uriunescape(*argv,ab);
+ write(1,ab,len);
if(argc-1) write(1," ",1);
}
} else {