Let's play SetToken() and NewToken() play nice together.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16234 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2005, Haiku.
|
* Copyright 2001-2006, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -65,6 +65,10 @@ BTokenSpace::SetToken(int32 token, int16 type, void* object)
|
|||||||
token_info tokenInfo = { type, object };
|
token_info tokenInfo = { type, object };
|
||||||
|
|
||||||
fTokenMap[token] = tokenInfo;
|
fTokenMap[token] = tokenInfo;
|
||||||
|
|
||||||
|
// this makes sure SetToken() plays more or less nice with NewToken()
|
||||||
|
if (token >= fTokenCount)
|
||||||
|
fTokenCount = token + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user