[Kde-bindings] Smoke::numMethodNames of by one

Richard Dale rdale at foton.es
Tue Dec 9 12:16:35 UTC 2008


On Thursday 04 December 2008 09:44:05 Tobias Rautenkranz wrote:
> Hi,
>
> I think Smoke::numMethodNames is set one to low.
>
> e.g.:
> in the generated: smoke/kde/smokedata.cpp:
>
> The last element of "static const char *kde_methodNames[]" is:
> >     "~WindowArgs",      //10106
> > };
>
> but numMethodNames is set to 10106 instead of 10107:
> >    kde_Smoke = new Smoke(
> >       [...]
> >       kde_methodNames, 10106,
>
> The attached patch fixes this.
Maybe the comment is misleading, but I think the code is correct. I did a test 
(please see the attached file search.c), and if the number was increased by 
one it gave a seg fault when looking for a method name, "~zzz" that was higher 
than the highest in the array.

-- Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: search.c
Type: text/x-csrc
Size: 2452 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20081209/34922b25/attachment.c>


More information about the Kde-bindings mailing list