-/* $OpenBSD: ucc.c,v 1.33 2022/03/29 16:04:36 anton Exp $ */
+/* $OpenBSD: ucc.c,v 1.34 2022/08/05 16:59:50 miod Exp $ */
/*
* Copyright (c) 2021 Anton Lindqvist <anton@openbsd.org>
if (ucc_usage_to_sym(usage, &us))
return 0;
- if (sc->sc_maplen + 2 > sc->sc_mapsiz)
+ if (sc->sc_maplen + 2 >= sc->sc_mapsiz)
return ENOMEM;
sc->sc_map[sc->sc_maplen++] = KS_KEYCODE(sc->sc_isarray ? usage : bit);
sc->sc_map[sc->sc_maplen++] = us->us_key;