Re: [Mono-dev] libgdiplus-2.8 - no need to go long long

2010-10-12 Thread Alexander Stohr
Ralph Leckett (rleckett at gmail.com) wrote on Mon Oct 11 11:56:00 EDT 2010: The following is a better way: long size; size = bmi.biWidth; if (size G_MAXINT32 / 4) goto error; size *= 4; it does the comparison based upon the numbers length in a

[Mono-dev] libgdiplus-2.8 - no need to go long long

2010-10-11 Thread Ralph Leckett
In libgdiplus-2.8, the following is dumb: unsigned long long int size; size = bmi.biWidth; size *= 4; if (size G_MAXINT32) goto error; The following is a better way: long size; size = bmi.biWidth; if (size G_MAXINT32 /

Re: [Mono-dev] libgdiplus-2.8 - no need to go long long

2010-10-11 Thread Alexander Shulgin
On 11.10.2010 18:56, Ralph Leckett wrote: In libgdiplus-2.8, the following is dumb: unsigned long long int size; size = bmi.biWidth; size *= 4; if (size G_MAXINT32) goto error; The following is a better way: long size; size =