Changeset 2702 for trunk/src/kmk/function.c
- Timestamp:
- Nov 21, 2013, 1:11:08 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/function.c
r2698 r2702 4438 4438 const char *src = comp; 4439 4439 const char *end = strchr (comp, PATH_SEPARATOR_CHAR); 4440 size_t comp_len = end ? (size_t)(end - comp) : strlen (comp);4441 if (! comp_len)4440 size_t src_len = end ? (size_t)(end - comp) : strlen (comp); 4441 if (!src_len) 4442 4442 { 4443 comp_len = 1;4443 src_len = 1; 4444 4444 src = "."; 4445 4445 } 4446 if (len + comp_len + 2 + 4 < GET_PATH_MAX) /* +4 for .exe */4446 if (len + src_len + 2 + 4 < GET_PATH_MAX) /* +4 for .exe */ 4447 4447 { 4448 memcpy (buf, comp, comp_len);4449 buf [ comp_len] = '/';4450 memcpy (&buf[ comp_len + 1], cur, len);4451 buf[ comp_len + 1 + len] = '\0';4448 memcpy (buf, src, src_len); 4449 buf [src_len] = '/'; 4450 memcpy (&buf[src_len + 1], cur, len); 4451 buf[src_len + 1 + len] = '\0'; 4452 4452 4453 4453 if (func_which_test_x (buf))
Note:
See TracChangeset
for help on using the changeset viewer.