From f89e1690df4b0c96c31f5f2e346e8843b5e3dcba Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 11 Sep 2014 23:36:12 -0700 Subject: [PATCH] webpmux: fix exit status on numeric value parse error in most cases 'ok' is set via a goto macro Change-Id: I17c832446bf3e716d3bcd323dbcc72bec544029c --- examples/webpmux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/webpmux.c b/examples/webpmux.c index 5fa5387a..440ed71f 100644 --- a/examples/webpmux.c +++ b/examples/webpmux.c @@ -874,7 +874,7 @@ static int GetFrameFragment(const WebPMux* mux, ErrGet: WebPDataClear(&info.bitstream); WebPMuxDelete(mux_single); - return ok; + return ok && !parse_error; } // Read and process config. @@ -946,7 +946,8 @@ static int Process(const WebPMuxConfig* config) { ERROR_GOTO1("ERROR: Loop count must be in the range 0 to " "65535.\n", Err2); } - if (parse_error) goto Err2; + ok = !parse_error; + if (!ok) goto Err2; params.loop_count = (int)loop_count; break; }