diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-11-11 23:12:37 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-11-11 23:12:37 +0200 |
commit | f23d62da85fad992feeddd630ce07f0214df7029 (patch) | |
tree | 22fabc71a4c1fd1fdc69346f41b4e71e87f4ff6d /field.c | |
parent | 5cd73ffdcdbd5de2d03b9db781ca26c5a5af516d (diff) | |
parent | b4cf3cc470eb1200ec90fcc7ad5b2d069059cf7e (diff) | |
download | egawk-f23d62da85fad992feeddd630ce07f0214df7029.tar.gz egawk-f23d62da85fad992feeddd630ce07f0214df7029.tar.bz2 egawk-f23d62da85fad992feeddd630ce07f0214df7029.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'field.c')
-rw-r--r-- | field.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -277,6 +277,12 @@ set_record(const char *buf, int cnt) /* copy the data */ memcpy(databuf, buf, cnt); + /* + * Add terminating '\0' so that C library routines + * will know when to stop. + */ + databuf[cnt] = '\0'; + /* manage field 0: */ unref(fields_arr[0]); getnode(n); |