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_text/text_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_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index d2defb0341d..1a0514c9735 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2603,12 +2603,16 @@ 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; - - RNA_string_set(op->ptr, "text", str); + } + else { + char str[2]; + str[0]= event->ascii; + str[1]= '\0'; + RNA_string_set(op->ptr, "text", str); + } } ret = insert_exec(C, op); |