solstice-pp

Post-processing utilities for the solstice app
git clone git://git.meso-star.com/solstice-pp.git
Log | Files | Refs | README | LICENSE

commit 883e335b0e58df33336c275d59fc3dd6435c5af4
parent 57b1ae59ad893b8b9561c62265f68c18ff728f7c
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue, 21 Jul 2026 17:23:02 +0200

BugFix in simulation result reading

Code introduced to enable to use stdin as input was broken.

Diffstat:
Msrc/solpp.h | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/solpp.h b/src/solpp.h @@ -290,6 +290,7 @@ read_receiver_map(struct simul* simul, FILE* input, buf_char_T* dont_read) buf_char_T buf = BUF_NULL; char* line = NULL; size_t i, n; + int exit_loop; CHK(line = read_line(&buf, input, dont_read)); @@ -313,8 +314,9 @@ read_receiver_map(struct simul* simul, FILE* input, buf_char_T* dont_read) do { read_receiver_map_side_data(rcv, n, input, dont_read); line = read_line(&buf, input, dont_read); - BUF_SAVE(*dont_read, line, 1+strlen(line)); - } while(line && !strncmp(line, "SCALARS", 7)); + exit_loop = (!line || strncmp(line, "SCALARS", 7)); + if(line) { BUF_SAVE(*dont_read, line, 1+strlen(line)); } + } while(!exit_loop); BUF_RELEASE(buf); }