Sdk/Algortihm: Fix 64bits shift

This commit is contained in:
Jérôme Leclercq 2017-10-06 15:18:37 +02:00 committed by Lynix
parent cb57721a65
commit 10e2d3008a
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ namespace Ndk
static_assert(N-1 <= sizeof(ComponentId), "Name too long for this size of component id"); static_assert(N-1 <= sizeof(ComponentId), "Name too long for this size of component id");
ComponentId componentId = 0; ComponentId componentId = 0;
for (unsigned int i = 0; i < N; ++i) for (unsigned int i = 0; i < N - 1; ++i)
componentId |= static_cast<ComponentId>(name[i]) << i*8; componentId |= static_cast<ComponentId>(name[i]) << i*8;
return componentId; return componentId;