# | Line 279 | Line 279 | do_transpose(const MEMLOAD *mp) | |
---|---|---|
279 | if (ni_columns <= 0) | |
280 | ni_columns = count_columns(rp); | |
281 | nrecords = rp->nrecs; | |
282 | < | } else if ((ni_rows > 0) & (ni_columns > 0)) |
282 | > | } else if ((ni_rows > 0) & (ni_columns > 0)) { |
283 | nrecords = ni_rows*ni_columns; | |
284 | < | else |
284 | > | if (nrecords > mp->len / -record_width) { |
285 | > | fprintf(stderr, |
286 | > | "Input too small for specified size and type\n"); |
287 | > | return(0); |
288 | > | } |
289 | > | } else |
290 | nrecords = mp->len / -record_width; | |
291 | /* check sizes */ | |
292 | if (ni_rows <= 0) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |