diff --git a/gb.cairo/src/c_cairo.c b/gb.cairo/src/c_cairo.c index 2afd18a49..ddafd1f4f 100644 --- a/gb.cairo/src/c_cairo.c +++ b/gb.cairo/src/c_cairo.c @@ -979,7 +979,7 @@ BEGIN_METHOD(Cairo_Text, GB_STRING text) CHECK_CNT(); - cairo_show_text(CNT, GB.ToZeroString(ARG(text))); + cairo_text_path(CNT, GB.ToZeroString(ARG(text))); END_METHOD diff --git a/gb.image.imlib/src/c_image.c b/gb.image.imlib/src/c_image.c index d43d674d5..899d300cd 100644 --- a/gb.image.imlib/src/c_image.c +++ b/gb.image.imlib/src/c_image.c @@ -27,8 +27,11 @@ static void free_image(GB_IMG *img, void *image) { - imlib_context_set_image((Imlib_Image)image); - imlib_free_image(); + if (image) + { + imlib_context_set_image((Imlib_Image)image); + imlib_free_image(); + } } static void *temp_image(GB_IMG *img) diff --git a/main/gbx/gbx_c_array.c b/main/gbx/gbx_c_array.c index e090db66f..3a518dbad 100644 --- a/main/gbx/gbx_c_array.c +++ b/main/gbx/gbx_c_array.c @@ -1668,20 +1668,40 @@ void CARRAY_split(CARRAY *_object, const char *str, int lstr, const char *sep, c if (esc == NULL || *esc == 0) { i = lstr; - while (i--) + + if (!lsep) { - c = *str; + char csep = sep[0]; - if (c == *sep || (lsep && index(&sep[1], c))) - add_entry(); - else + while (i--) { - //add_char(str); - if (!_lptr) _ptr = str; - _lptr++; + if (*str == csep) + add_entry(); + else + { + //add_char(str); + if (!_lptr) _ptr = str; + _lptr++; + } + + str++; + } + } + else + { + while (i--) + { + if (index(sep, *str)) + add_entry(); + else + { + //add_char(str); + if (!_lptr) _ptr = str; + _lptr++; + } + + str++; } - - str++; } add_entry();