<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 4:01 PM, <span dir="ltr"><<a href="mailto:bil@ccrma.stanford.edu" target="_blank">bil@ccrma.stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(int)-1 % (unsigned int)10 => 5<br>
</blockquote>
<br></span>
That's very interesting -- I never noticed this!<br>
Thanks very much for the bugfix -- I'll merge it into<br>
my sources today -- then I need to look at all<br>
the other % cases.<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Yes, very good catch. Regarding unsigned integers, there have</div><div>been so many bugs caused by unsigned integers that I have</div><div>stopped using them completely in my software.<br></div><div>(The common bug is of course "(unsigned int)-1 < 0", and</div><div>variants of it, which is always false.)</div><div><br></div><div>I think Qt practices the same philosophy; no unsigned integers.</div><div><br></div></div></div></div>