ia32: Prevent out-of-bounds access after calling emit_asm_operand().
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 27 Nov 2012 22:21:19 +0000 (23:21 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 27 Nov 2012 22:22:42 +0000 (23:22 +0100)
ir/be/ia32/ia32_emitter.c

index 7fa6616..8a8a0e8 100644 (file)
@@ -1009,7 +1009,8 @@ static const char* emit_asm_operand(const ir_node *node, const char *s)
        case 0:
                ir_fprintf(stderr, "Warning: asm text (%+F) ends with %%\n", node);
                be_emit_char('%');
-               return s + 1;
+               return s;
+
        case '%':
                be_emit_char('%');
                return s + 1;