On 5 April 2014 18:24, Thiago Macieira <[email protected]> wrote: > Em sáb 05 abr 2014, às 12:20:25, Lubomir I. Ivanov escreveu: >> the argument swap is my fault which originates back to the GTK version. >> was not caught because we didn't use streamsize and only checked if >> fread() succeeds. > > And I've never cared about the order. If you're trying to read N elements of > size S, you're reading N*S bytes. > > And we all know "the order of the factors does not alter the product", so S*N > is also valid. > > So how does this fix anything? What am I missing? >
streamsize is later used to null terminate a buffer after the first byte, because of the argument order. membuf[streamsize] = 0; lubomir -- _______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
