X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/f15300499bce37cd28ea2ace0f2bd1c364fc835e..refs/heads/master:/contents.c diff --git a/contents.c b/contents.c index 35143cd..1649212 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); @@ -154,7 +154,7 @@ word *number_mktext(numberstate *state, paragraph *p, wchar_t *category, case para_Subsect: level = (p->type == para_Heading ? 0 : p->aux); if (level > state->oklevel) { - error(err_sectjump, &p->fpos); + err_sectjump(&p->fpos); *errflag = TRUE; ret = NULL; break;