aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-04-27 14:09:25 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-04-27 14:09:25 +0300
commit7bab0e1ff31ebaf7716fe2716a630c92b8ca8a44 (patch)
treebac93ed98e429ea3ecd42885a8d087db3e69fb21 /field.c
parenta435b8da2941d0b3c997420c71b1f4b7b79b52ff (diff)
parente78dfd4b04060ad3278a1b3505720893ec432617 (diff)
downloadegawk-7bab0e1ff31ebaf7716fe2716a630c92b8ca8a44.tar.gz
egawk-7bab0e1ff31ebaf7716fe2716a630c92b8ca8a44.tar.bz2
egawk-7bab0e1ff31ebaf7716fe2716a630c92b8ca8a44.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'field.c')
-rw-r--r--field.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/field.c b/field.c
index 6a7c6b1d..13a5db6f 100644
--- a/field.c
+++ b/field.c
@@ -163,7 +163,7 @@ rebuild_record()
tlen += (NF - 1) * OFSlen;
if ((long) tlen < 0)
tlen = 0;
- emalloc(ops, char *, tlen + 2, "rebuild_record");
+ emalloc(ops, char *, tlen + 1, "rebuild_record");
cops = ops;
ops[0] = '\0';
for (i = 1; i <= NF; i++) {
@@ -1138,7 +1138,7 @@ set_FIELDWIDTHS()
FIELDWIDTHS[0] = 0;
for (i = 1; ; i++) {
unsigned long int tmp;
- if (i + 2 >= fw_alloc) {
+ if (i + 1 >= fw_alloc) {
fw_alloc *= 2;
erealloc(FIELDWIDTHS, int *, fw_alloc * sizeof(int), "set_FIELDWIDTHS");
}