]> granicus.if.org Git - jq/commitdiff
builtin/f_match: call onig_error_code_to_str with einfo correctly
authorDerrick Pallas <derrick@pallas.us>
Sun, 3 Feb 2019 00:17:12 +0000 (16:17 -0800)
committerDerrick Pallas <derrick@pallas.us>
Sun, 3 Feb 2019 00:17:12 +0000 (16:17 -0800)
src/builtin.c

index baa689156937ad4d1694d9cabad6c844e97c0ef9..c56dca9e4db5cb648d0dc75ac4c317198a6e3e2d 100644 (file)
@@ -935,7 +935,7 @@ static jv f_match(jq_state *jq, jv input, jv regex, jv modifiers, jv testmode) {
       break;
     } else { /* Error */
       UChar ebuf[ONIG_MAX_ERROR_MESSAGE_LEN];
-      onig_error_code_to_str(ebuf, onigret, einfo);
+      onig_error_code_to_str(ebuf, onigret, &einfo);
       jv_free(result);
       result = jv_invalid_with_msg(jv_string_concat(jv_string("Regex failure: "),
             jv_string((char*)ebuf)));