Re: [Firebird-devel] Interesting assert

2014-10-03 Thread Alex Peshkoff
On 10/03/14 20:27, Dimitry Sibiryakov wrote: > 03.10.2014 18:21, Alex Peshkoff wrote: >> Looks like it's check to make sure that SSHORT does not overflow. > Does it really work? I thought that result of expressions like this one > is casted to > integer, so even if it overflows short, it still

Re: [Firebird-devel] Interesting assert

2014-10-03 Thread Dimitry Sibiryakov
03.10.2014 18:21, Alex Peshkoff wrote: > Looks like it's check to make sure that SSHORT does not overflow. Does it really work? I thought that result of expressions like this one is casted to integer, so even if it overflows short, it still is bigger than zero. -- WBR, SD. -

Re: [Firebird-devel] Interesting assert

2014-10-03 Thread Alex Peshkoff
On 10/03/14 15:05, Roman Simakov wrote: > Hello Claudio and all! > > I found very interesting assert in backup.epp (put_data function) > > fb_assert(field_count > 0 && field_count * 9 > 0 && field_count * 9 + 200 > 0) > > could you explain it? > > Looks like it's check to make sure that SSHORT doe

[Firebird-devel] Interesting assert

2014-10-03 Thread Roman Simakov
Hello Claudio and all! I found very interesting assert in backup.epp (put_data function) fb_assert(field_count > 0 && field_count * 9 > 0 && field_count * 9 + 200 > 0) could you explain it? -- Roman Simakov -- Meet P