comparison src/sprite.c @ 399:31b6633e3538

- Fix a minor error in src/sprite.c: should check *(s-1) instead of *s or the pointer will stop at '/', which is not what we want. - Fix various load path errors in examples because libtool put .so into .libs directory. - Fix an error in examples/dynamic/Makefile.am: scene_la_SOURCES should be scene.c instead of mytext.c
author john.cylee@gmail.com
date Fri, 12 Jun 2009 18:36:15 +0800
parents 25bc0e753b88
children 16116d84bc5e
comparison
equal deleted inserted replaced
398:674717c2c3ee 399:31b6633e3538
55 if (handle == NULL) { 55 if (handle == NULL) {
56 fprintf(stderr, "can not load object %s\n", path); 56 fprintf(stderr, "can not load object %s\n", path);
57 return NULL; 57 return NULL;
58 } 58 }
59 s = name + strlen(name)-1; 59 s = name + strlen(name)-1;
60 while((s != name) && *s != '/') s--; 60 while((s != name) && *(s-1) != '/') s--;
61 snprintf(path,sizeof(path), "%s_new", s); 61 snprintf(path,sizeof(path), "%s_new", s);
62 new = dlsym(handle,path); 62 new = dlsym(handle,path);
63 if (new == NULL) { 63 if (new == NULL) {
64 fprintf(stderr," Can not find symbol %s at module\n", path); 64 fprintf(stderr," Can not find symbol %s at module\n", path);
65 return NULL; 65 return NULL;