}
m_storage = NULL;
- fseek(fp, 0L, SEEK_END);
+ if (0 != fseek(fp, 0L, SEEK_END)) {
+ fclose(fp);
+ return -1;
+ }
+
long size = ftell(fp);
if (size > 0) {
}
m_storage = NULL;
- fseek(fp, 0, SEEK_END);
+ if (0 != fseek(fp, 0L, SEEK_END)) {
+ fclose(fp);
+ return -1;
+ }
+
int file_size = ftell(fp);
if (file_size < offset + size) {
fclose(fp);
next_key = base_candidate.candidate_otherside;
} else if (popup_candidate.candidate_otherside != NOT_USED) {
next_window = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);
- next_key = popup_candidate.candidate;
+ next_key = popup_candidate.candidate_otherside;
}
} else {
/* Compare those 2 candidates */
}
}
}
+ sclshort layout_from = NOT_USED;
+ sclshort layout_to = NOT_USED;
+ if (windows->is_base_window(desc.window_from)) {
+ layout_from = context->get_base_layout();
+ } else {
+ layout_from = context->get_popup_layout(desc.window_from);
+ }
+ if (windows->is_base_window(desc.window_to)) {
+ layout_to = context->get_base_layout();
+ } else {
+ layout_to = context->get_popup_layout(desc.window_to);
+ }
+ if (!scl_check_arrindex(desc.key_from, MAX_KEY) || !scl_check_arrindex(desc.key_to, MAX_KEY) ||
+ !scl_check_arrindex(layout_from, MAX_SCL_LAYOUT) || !scl_check_arrindex(layout_to, MAX_SCL_LAYOUT)) {
+ start_animation = FALSE;
+ }
if (start_animation &&
context->get_highlight_ui_enabled() &&
context->get_highlight_ui_animation_enabled() &&
animator->check_animation_supported()) {
- sclshort layout_from = NOT_USED;
- sclshort layout_to = NOT_USED;
- if (windows->is_base_window(desc.window_from)) {
- layout_from = context->get_base_layout();
- } else {
- layout_from = context->get_popup_layout(desc.window_from);
- }
- if (windows->is_base_window(desc.window_to)) {
- layout_to = context->get_base_layout();
- } else {
- layout_to = context->get_popup_layout(desc.window_to);
- }
-
SclLayoutKeyCoordinatePointer prev_coordinate =
sclres_layout_key_coordinate_pointer_frame[layout_from][desc.key_from];
SclLayoutKeyCoordinatePointer next_coordinate =