On Tue, 2009-12-01 at 17:07 +0100, Sven Neumann wrote:
> On Tue, 2009-12-01 at 15:58 +0000, Andre DRASZIK wrote:
> > On Tue, 2009-12-01 at 16:36 +0100, Sven Neumann wrote:
> > > You probably have a point here and this should be fixed. But I don't
> > > quite understand why your test code takes the hard way of calculating
> > > the number of bytes from the number of characters. You can simply
> > > subtract the pointers into the string buffer, can't you ?
> > 
> > Probably - I didn't write the test case, only the patch :-)
> > 
> > Hm, if you were to subtract the pointers, you'd get a different
> > (incorrect) result again, as with the patch only 59 chars would have to
> > be drawn (when using ret_str_length to determine the amount of chars)
> > whereas subtracting pointers would still give you 60.
> 
> Can the test case be changed then so that it also checks that the
> returned pointer to the next line is correct?

The next line pointer is correct though, GetStringBreak() tries to skip
' ' and '\n' at the end of the current line, thus ret_str_length
(converted to bytes) can be different from the pointerdiff (61 vs. 62
bytes in this case)


a.


_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to