allowed pasting palette < 16 colors
@@ -612,19 +612,15 @@ static void removeWhiteSpaces(char* str)
}
bool fromClipboard(void* data, s32 size, bool flip, bool remove_white_spaces)
-{
- if(data)
{
if(tic_sys_clipboard_has())
{
char* clipboard = tic_sys_clipboard_get();
- if(clipboard)
- {
if (remove_white_spaces)
removeWhiteSpaces(clipboard);
- bool valid = strlen(clipboard) == size * 2;
+ bool valid = strlen(clipboard) <= size * 2;
if(valid) tic_tool_str2buf(clipboard, (s32)strlen(clipboard), data, flip);
@@ -632,8 +628,6 @@ bool fromClipboard(void* data, s32 size, bool flip, bool remove_white_spaces)
return valid;
}
- }
- }
return false;
}
