Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Fri, 2011-03-18 at 18:48 +0100, Petr Mladek wrote:
Michael Meeks píše v Pá 18. 03. 2011 v 17:12 +0000:
On Fri, 2011-03-18 at 17:56 +0100, Petr Mladek wrote:
http://cgit.freedesktop.org/libreoffice/writer/commit/?id=7482695994c5f6bf9995748944e38d2792aaed92

    This took quite some reading ... you essentially achieve:

    nNodeCnt = max(1, nNodeCnt - nDistance);

Does this really work when both nNodeCnt and nDistance are unsigned
long? It might produce a huge number if (nNodeCnt < nDistance).

That's not the real code above, that's the pseudo-code. The pseudo-code
would indeed wrap around to a huge number given that we're working in
unsigned values, but the real code avoids that.

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.