mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(str_utf8_offset_to_pos): change type of variable.
GString is pointless here. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
2e33fd4fad
commit
247d092217
@ -901,12 +901,12 @@ str_utf8_offset_to_pos (const char *text, size_t length)
|
||||
else
|
||||
{
|
||||
int result;
|
||||
GString *buffer;
|
||||
char *buffer;
|
||||
|
||||
buffer = g_string_new (text);
|
||||
str_utf8_fix_string (buffer->str);
|
||||
result = g_utf8_offset_to_pointer (buffer->str, length) - buffer->str;
|
||||
g_string_free (buffer, TRUE);
|
||||
buffer = g_strdup (text);
|
||||
str_utf8_fix_string (buffer);
|
||||
result = g_utf8_offset_to_pointer (buffer, length) - buffer;
|
||||
g_free (buffer);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user