MCPcopy Create free account
hub / github.com/assaultcube/AC / normalizemenuselection

Function normalizemenuselection

source/src/menus.cpp:93–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93int normalizemenuselection(int sel, int length)
94{
95 if (sel < 0) sel = length > 0 ? length - 1 : 0;
96 else if (sel >= length) sel = 0;
97 return sel;
98}
99
100void menuselect(void *menu, int sel)
101{

Callers 2

menuselectFunction · 0.85
movemenuselectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected