Off by one in writing the last entry when parsing input
This commit is contained in:
parent
12d2324731
commit
3ee003e55e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue