[PATCH 2/3] storage.dll16: Correctly handle block values of -1.
Alexandre Julliard
julliard at winehq.org
Mon Feb 20 03:39:29 CST 2017
Zebediah Figura <z.figura12 at gmail.com> writes:
> @@ -610,9 +610,10 @@ STORAGE_get_nth_next_small_blocknr(stream_access16*str,int blocknr,int nr) {
> READ_HEADER(str);
> assert(blocknr>=0);
> while ((nr--) && (blocknr>=0)) {
> - if (lastblocknr/128!=blocknr/128) {
> + if (lastblocknr>>7 != blocknr>>7)
> + {
> int bigblocknr;
> - bigblocknr = STORAGE_get_nth_next_big_blocknr(str,sth.sbd_startblock,blocknr/128);
> + bigblocknr = STORAGE_get_nth_next_big_blocknr(str,sth.sbd_startblock,blocknr>>7);
I'm not sure what you are trying to fix. Most places already check that
blocknr is >= 0, and if it's really negative, you can't rely on right
shift doing the right thing.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list