summaryrefslogtreecommitdiffstats
path: root/itypes.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-01-15 06:57:16 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-01-15 06:57:16 -0800
commit8ea9cc713f52fd0a1357aa5cded97ceb234b669a (patch)
treeb9df438b259d9197637ac500cf42386855226fa0 /itypes.h
parentd1b4bb2bc9448424284d5994fcd25ebacc65b17b (diff)
downloadtxr-8ea9cc713f52fd0a1357aa5cded97ceb234b669a.tar.gz
txr-8ea9cc713f52fd0a1357aa5cded97ceb234b669a.tar.bz2
txr-8ea9cc713f52fd0a1357aa5cded97ceb234b669a.zip
ffi: bugfix: char array shouldn't null terminate.
* ffi.c (ffi_char_array_put): The char array put operation should only null terminate when the null_term flag is set; i.e. it's a zarray type. The bug here is that when a Lisp string of length > N is put into an (array N char), the C array gets null terminated, which is wrong. Only in the case when the string is exactly of length N is there no null termination. In all cases when the length >= N, we want truncation without null termination.
Diffstat (limited to 'itypes.h')
0 files changed, 0 insertions, 0 deletions