mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 19:01:15 +00:00
Fix computation
- start of string is (name+9) - 'ptr' is the end of the desired substring, so the length should be (ptr - (name + 9)) which is (ptr - name) - 9)
This commit is contained in:
parent
3a3a8c47c9
commit
c3ed260bc4
1 changed files with 2 additions and 2 deletions
|
@ -942,8 +942,8 @@ typedef struct {
|
|||
mth = [[GSThemeMethod new] autorelease];
|
||||
types = method_getTypeEncoding(method);
|
||||
mth->imp = method_getImplementation(method);
|
||||
memcpy(buf, name + 9, (ptr - name) + 9);
|
||||
buf[(ptr - name) + 9] = '\0';
|
||||
memcpy(buf, name + 9, (ptr - name) - 9);
|
||||
buf[(ptr - name) - 9] = '\0';
|
||||
mth->cls = objc_lookUpClass(buf);
|
||||
if (mth->cls == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue