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:
parent
739ccb9b2f
commit
a5eeb74ac0
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2001-2005, Haiku.
|
||||
* Copyright 2001-2006, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
|
@ -65,6 +65,10 @@ BTokenSpace::SetToken(int32 token, int16 type, void* object)
|
|||
token_info tokenInfo = { type, object };
|
||||
|
||||
fTokenMap[token] = tokenInfo;
|
||||
|
||||
// this makes sure SetToken() plays more or less nice with NewToken()
|
||||
if (token >= fTokenCount)
|
||||
fTokenCount = token + 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue