Tell us at least the linenumber
[fw/sdcc] / src / SDCC.y
index 02fce6ea68df0f6878f60977a0e575bd8954f578..98b944db8b945ed14153918536b25597ec1dc461 100644 (file)
@@ -33,6 +33,7 @@
 #include "SDCCast.h"
 #include "port.h"
 #include "newalloc.h"
+#include "SDCCerr.h"
 
 extern int yyerror (char *);
 extern FILE    *yyin;
@@ -1114,7 +1115,7 @@ statement
    | jump_statement
    | INLINEASM  ';'      {
                             ast *ex = newNode(INLINEASM,NULL,NULL);
-                           ex->values.inlineasm = Safe_calloc(strlen($1));
+                           ex->values.inlineasm = Safe_calloc(1,strlen($1)+1);
                            strcpy(ex->values.inlineasm,$1);                        
                            $$ = ex;
                          }