summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2022-11-06 17:35:19 -0800
committerPhilip Chimento <philip.chimento@gmail.com>2023-02-19 21:25:18 -0800
commitf22f7ec5d9c9097ad76a750fb277beb2e07425cc (patch)
treed5d6c729d8280f3212cad6c9045f185e0b00c907
parent0d24d36ee0be96ecbee70c2dbb528176dfab1a4d (diff)
downloadgjs-f22f7ec5d9c9097ad76a750fb277beb2e07425cc.tar.gz
arg-cache: Format hex flags value in error message
The counterpart to this error message in arg.cpp formats the flags value in hex; this message should too.
-rw-r--r--gi/arg-cache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gi/arg-cache.cpp b/gi/arg-cache.cpp
index 5274aead..eb8e9724 100644
--- a/gi/arg-cache.cpp
+++ b/gi/arg-cache.cpp
@@ -1081,7 +1081,9 @@ bool FlagsIn::in(JSContext* cx, GjsFunctionCallState*, GIArgument* arg,
return false;
if ((uint64_t(number) & m_mask) != uint64_t(number)) {
- gjs_throw(cx, "%" PRId64 " is not a valid value for flags argument %s",
+ gjs_throw(cx,
+ "0x%" G_GINT64_MODIFIER
+ "x is not a valid value for flags argument %s",
number, m_arg_name);
return false;
}