- /* FIXME: Define this as a callback, or pass back string? */
- as_bad ("bad instruction `%s'", start);
- return NULL;
+ /* FIXME: We can return a better error message than this.
+ Need to track why it failed and pick the right one. */
+ {
+ static char errbuf[100];
+ sprintf (errbuf, "bad instruction `%.50s%s'",
+ start, strlen (start) > 50 ? "..." : "");
+ *errmsg = errbuf;
+ return NULL;
+ }