summaryrefslogtreecommitdiff
path: root/tools/d2c/d2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/d2c/d2c.c')
-rw-r--r--tools/d2c/d2c.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/d2c/d2c.c b/tools/d2c/d2c.c
index fbf401e..96bb81a 100644
--- a/tools/d2c/d2c.c
+++ b/tools/d2c/d2c.c
@@ -198,7 +198,15 @@ int main(int argc, char **argv)
break;
case 'o':
- asprintf(&info.opcodes_dir, "%sopcodes%c", optarg, optarg[strlen(optarg) - 1]);
+
+ ret = asprintf(&info.opcodes_dir, "%sopcodes%c", optarg, optarg[strlen(optarg) - 1]);
+
+ if (ret == -1)
+ {
+ info.opcodes_dir = NULL;
+ fprintf(stderr, "unable to memorize the specified main output directory; exiting...\n");
+ goto exit;
+ }
break;
case 't':