diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-02 16:12:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-02 16:12:30 +0300 |
commit | 369a5cc29e80d0ac30f9db444f2c0f9c1da32e01 (patch) | |
tree | e6510d985b37ef027e5614da8b5479a2d95c7a92 /source/blender/editors/space_console/console_ops.c | |
parent | 5d7ed88f17c7a253c81ee48c147149d73dd88e6a (diff) |
fix for compiling with the c90 standard, support for non-static variable initializers is a c99 feature.
Diffstat (limited to 'source/blender/editors/space_console/console_ops.c')
-rw-r--r-- | source/blender/editors/space_console/console_ops.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 2b419b0a833..ceb16d2aab9 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -404,12 +404,17 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event) { // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ if(!RNA_string_length(op->ptr, "text")) { - char str[2] = {event->ascii, '\0'}; /* if alt/ctrl/super are pressed pass through */ - if(event->ctrl || event->oskey) + if(event->ctrl || event->oskey) { return OPERATOR_PASS_THROUGH; + } + else { + char str[2]; + str[0]= event->ascii; + str[1]= '\0'; - RNA_string_set(op->ptr, "text", str); + RNA_string_set(op->ptr, "text", str); + } } return insert_exec(C, op); } @@ -863,7 +868,10 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve SpaceConsole *sc= CTX_wm_space_console(C); ARegion *ar= CTX_wm_region(C); SetConsoleCursor *scu= op->customdata; - int mval[2] = {event->mval[0], event->mval[1]}; + int mval[2]; + + mval[0]= event->mval[0]; + mval[1]= event->mval[1]; set_cursor_to_pos(sc, ar, scu, mval, TRUE); ED_area_tag_redraw(CTX_wm_area(C)); |