summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-08-04 16:25:06 +0000
committerSimon Tatham <anakin@pobox.com>2004-08-04 16:25:06 +0000
commit52bb851927bccd84b858f66b2b0544b4f39083a7 (patch)
treed1eb78c3c86187a00b54b3e73121e0801fb77913
parentf7eeb51d4e3e44f5bd46fcd19d5695540f084560 (diff)
downloadhalibut-52bb851927bccd84b858f66b2b0544b4f39083a7.zip
halibut-52bb851927bccd84b858f66b2b0544b4f39083a7.tar.gz
halibut-52bb851927bccd84b858f66b2b0544b4f39083a7.tar.bz2
halibut-52bb851927bccd84b858f66b2b0544b4f39083a7.tar.xz
Colin spotted a sizeof/lenof confusion which we think has been
causing segfaults on strange architectures. [originally from svn r4398]
-rw-r--r--contents.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contents.c b/contents.c
index 35143cd..2acf81e 100644
--- a/contents.c
+++ b/contents.c
@@ -69,7 +69,7 @@ static void dospace(word ***wret) {
static void donumber(word ***wret, int num) {
wchar_t text[20];
- wchar_t *p = text + sizeof(text);
+ wchar_t *p = text + lenof(text);
*--p = L'\0';
while (num != 0) {
assert(p > text);
@@ -93,7 +93,7 @@ static void doanumber(word ***wret, int num) {
else
aton = INT_MAX;
}
- p = text + sizeof(text);
+ p = text + lenof(text);
*--p = L'\0';
while (nletters--) {
assert(p > text);