diff src/img_ldr.c @ 346:b391722bf20e

sh_image_t::img_data is managed by paint_image_t. - sh_image_t should not try to free it. - call sh_text_P_generate_layout() in sh_text_transform() - remove calling from other functions.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 08 Mar 2009 14:44:41 +0800
parents 43900cae1d49
children 3e84458968ec
line wrap: on
line diff
--- a/src/img_ldr.c	Sun Mar 08 11:47:14 2009 +0800
+++ b/src/img_ldr.c	Sun Mar 08 14:44:41 2009 +0800
@@ -113,7 +113,7 @@
 	return NULL;
     }
     strcpy((char *)ldr->repo, img_repository);
-    if(img_repository[sz - 1] != '/') {
+    if(img_repository[sz - 1] != '/' && strlen(img_repository) != 0) {
 	((char *)ldr->repo)[sz] = '/';
 	((char *)ldr->repo)[sz + 1] = 0;
     }