From 8cae1622455f6479a13fabd096cd9d9d3d0abd47 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sat, 13 Mar 2010 04:51:24 +0000 Subject: [#21580] -- argument tries to load as a blend file Stop processing arguments on -- --- source/blender/blenlib/intern/BLI_args.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenlib/intern/BLI_args.c') diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index cd876023830..abf9dbcd9c5 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -177,6 +177,10 @@ void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void * int i = 0; for( i = 1; i < ba->argc; i++) { /* skip argv[0] */ + /* stop on -- */ + if (BLI_streq(ba->argv[i], "--")) + break; + if (ba->passes[i] == 0) { /* -1 signal what side of the comparison it is */ bArgument *a = lookUp(ba, ba->argv[i], pass, -1); -- cgit v1.2.3