db: Fix off-by-one error in initHookName()
Thanks to Lawrence T. Prevatte III for noticing that.
This commit is contained in:
+1
-1
@@ -123,7 +123,7 @@ const char *initHookName(int state)
|
||||
"initHookAfterInterruptAccept",
|
||||
"initHookAtEnd"
|
||||
};
|
||||
if (state < 0 || state > NELEMENTS(stateName)) {
|
||||
if (state < 0 || state >= NELEMENTS(stateName)) {
|
||||
return "Not an initHookState";
|
||||
}
|
||||
return stateName[state];
|
||||
|
||||
Reference in New Issue
Block a user