..
This commit is contained in:
parent
262463046e
commit
c4a55fcaa0
3 changed files with 8 additions and 10 deletions
|
@ -92,7 +92,7 @@ int main(int argc, const char* argv[])
|
||||||
" [--identity <identity>]\n"
|
" [--identity <identity>]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Expression example:\n"
|
"Expression example:\n"
|
||||||
" (?<alias>(?<call>[RU][A-Z]?[0-9][A-Z]{1,4})[^;])\n"
|
" (?<alias>(?<call>[A-Z0-9]{2,7})[-,][^;]+)\n"
|
||||||
"\n",
|
"\n",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
@ -48,7 +48,7 @@ uint32_t PatchCordProxy::getTalkerID()
|
||||||
|
|
||||||
void PatchCordProxy::setTalkerAlias(const char* value)
|
void PatchCordProxy::setTalkerAlias(const char* value)
|
||||||
{
|
{
|
||||||
int length = strlen(value);
|
int length = strlen(value) + 1;
|
||||||
size_t index = VALUE_CORD_TALKER_ALIAS;
|
size_t index = VALUE_CORD_TALKER_ALIAS;
|
||||||
uint32_t* data = (uint32_t*)alloca(length + sizeof(uint32_t));
|
uint32_t* data = (uint32_t*)alloca(length + sizeof(uint32_t));
|
||||||
|
|
||||||
|
|
|
@ -48,19 +48,17 @@ uint32_t PatchCordProxy::getTalkerID()
|
||||||
|
|
||||||
void PatchCordProxy::setTalkerAlias(const char* value)
|
void PatchCordProxy::setTalkerAlias(const char* value)
|
||||||
{
|
{
|
||||||
size_t length = strlen(value);
|
int length = strlen(value) + 1;
|
||||||
const uint32_t* data = (const uint32_t*)value;
|
|
||||||
|
|
||||||
size_t index = VALUE_CORD_TALKER_ALIAS;
|
size_t index = VALUE_CORD_TALKER_ALIAS;
|
||||||
size_t count =
|
uint32_t* data = (uint32_t*)alloca(length + sizeof(uint32_t));
|
||||||
(length / sizeof(uint32_t)) +
|
|
||||||
((length % sizeof(uint32_t)) > 0);
|
memcpy(data, value, length);
|
||||||
|
|
||||||
getContextBanner();
|
getContextBanner();
|
||||||
while (count > 0)
|
while (length > 0)
|
||||||
{
|
{
|
||||||
setSpecificValue(index, *data);
|
setSpecificValue(index, *data);
|
||||||
count --;
|
length -= sizeof(uint32_t);
|
||||||
index ++;
|
index ++;
|
||||||
data ++;
|
data ++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue