diff options
author | chris <chris> | 2006-09-20 13:24:08 +0000 |
---|---|---|
committer | chris <chris> | 2006-09-20 13:24:08 +0000 |
commit | 22b863dbb84e09ec27558a4d419c405a7c392eae (patch) | |
tree | b8f82235f3ba8aaeedd24be0a05c6e649a547537 | |
parent | 5f4d53f62408a05382e62cce36449b9effb80940 (diff) |
D'oh.
-rw-r--r-- | tileserver/netstring.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tileserver/netstring.c b/tileserver/netstring.c index b30ca5a67..f6bbc3b72 100644 --- a/tileserver/netstring.c +++ b/tileserver/netstring.c @@ -7,7 +7,7 @@ * */ -static const char rcsid[] = "$Id: netstring.c,v 1.1 2006-09-20 10:25:14 chris Exp $"; +static const char rcsid[] = "$Id: netstring.c,v 1.2 2006-09-20 13:24:08 chris Exp $"; #include <sys/types.h> #include <stdio.h> @@ -20,9 +20,9 @@ size_t netstring_write(char *out, const void *buf, const size_t len) { size_t l = 0; char dummy[32]; l += sprintf(out ? out : dummy, "%u:", (unsigned)len); - if (out) memcpy(p, buf, len); + if (out) memcpy(out + l, buf, len); l += len; - if (out) buf[l] = ','; + if (out) out[l] = ','; ++l; return l; } |