TokenSpace: fix token wraparound

Fix bug that allocating/freeing a lot of BHandler cause token wraparound
and overwriting existing assigned tokens.

Change-Id: I12527126644bca1793a8475dc487f131e6f83437
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9533
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
X512
2025-08-03 22:50:25 +00:00
committed by waddlesplash
parent 00c891c0c8
commit 2a70c45937
2 changed files with 27 additions and 10 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ private:
typedef std::map<int32, token_info> TokenMap;
TokenMap fTokenMap;
int32 fTokenCount;
int32 fNextToken;
};