pos on right hand size should have been i...found the bug shortly after
posting. thanks.
-------------
Jim Michaels
[email protected]
[email protected]
http://RenewalComputerServices.com
http://JesusnJim.com (computer repair info, programming)
From: David Macek <[email protected]>
To: [email protected]
Sent: Friday, December 19, 2014 11:52 AM
Subject: Re: [Mingw-w64-public] why isn't UINT64_MAX usable when countdown
reaches past 0 to -1?
On 18. 12. 2014 21:35, Jim Michaels wrote:
> dongshengdaily 5.0.0 20141105
>
> #if defined(_WIN64)
> for (i=src.size()-1-findStr.size(); i>=pos && pos!=UINT64_MAX; i--) {
> #else
> for (i=src.size()-1-findStr.size(); i>=pos && pos!=UINT32_MAX; i--) {
> #endif
> std::cerr<<"i="<<i<<", findStrSizeDiv2="<<findStrSizeDiv2<<",
>findStrSizeMod2="<<findStrSizeMod2<<std::endl;
>
>
> i=0, findStrSizeDiv2=3, findStrSizeMod2=1
> j=0, srcNarrowingRHS=0, srcNarrowingLHS=18446744073709551611,
> fsNarrowingRHS=6, fsNa
> HS]=ÿ, src[srcNarrowingRHS]=g
>
> i=18446744073709551615, findStrSizeDiv2=3, findStrSizeMod2=1
> j=0, srcNarrowingRHS=18446744073709551615,
> srcNarrowingLHS=18446744073709551610, fsN
> , src[srcNarrowingLHS]=ÿ, src[srcNarrowingRHS]=...
>
> notice i. the loop didn't stop. I corrected the improper value for
> UINT64_MAX, but this did not fix the problem.
You are only comparing "pos" with UINTxx_MAX, not "i". If "pos" is 0, then the
loop won't stop.
--
David Macek
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public