# HG changeset patch # User wycc # Date 1280333491 -28800 # Node ID 818e870e1eb5dfb4b1d8124c30244f1950d421a3 # Parent c9f8c7e6f57eee9f0569d39d187e0dd97357ebfb Check if the path is absolute path. We use the default prefix only for relative path. diff -r c9f8c7e6f57e -r 818e870e1eb5 src/img_ldr.c --- a/src/img_ldr.c Wed Jul 28 08:36:58 2010 +0800 +++ b/src/img_ldr.c Thu Jul 29 00:11:31 2010 +0800 @@ -33,7 +33,10 @@ sz = strlen(sldr->repo); sz += strlen(img_id); fname = (char *)malloc(sz + 2); - strcpy(fname, sldr->repo); + if (img_id[0] != '/') + strcpy(fname, sldr->repo); + else + fname[0] = 0; strcat(fname, img_id); surf = mbe_image_surface_create_from_png(fname);