Off by one in writing the last entry when parsing input

This commit is contained in:
Miguel M 2023-05-04 19:41:32 +01:00
parent 12d2324731
commit 3ee003e55e
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ matrix_t ParseMatrix(size_t row_len) {
// Write the last entry if necessary
if (!spaces) {
data_t value = as_matrix_entry(scan_str, scan_len);
head[len] = value;
head[len - 1] = value;
}
// Input sanitization: confirm that the number of entries read is a multiple