aboutsummaryrefslogtreecommitdiffstats
path: root/extension/ordchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'extension/ordchr.c')
-rw-r--r--extension/ordchr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extension/ordchr.c b/extension/ordchr.c
index e1afade5..ff990b6b 100644
--- a/extension/ordchr.c
+++ b/extension/ordchr.c
@@ -67,7 +67,7 @@ do_ord(int nargs, awk_value_t *result, struct awk_ext_func *unused)
assert(result != NULL);
if (get_argument(0, AWK_STRING, & str)) {
- ret = str.str_value.str[0];
+ ret = (unsigned char) str.str_value.str[0];
} else if (do_lint)
lintwarn(ext_id, _("ord: first argument is not a string"));