fix: correctly sort post variables when they have the same name

In PostParser we add some prefix with a number if the name of a variable is the same,
we should use zero padding for the number to be correctly sorted.
This commit is contained in:
Tomasz Sowa 2022-05-28 06:07:38 +02:00
parent 5e89c4004a
commit 3b5658ff8f
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2021, Tomasz Sowa * Copyright (c) 2008-2022, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -111,7 +111,7 @@ protected:
if( !added ) if( !added )
{ {
name += L"_inc"; name += L"_inc";
name += Toa(var_index); pt::Toa(var_index, name, false, 10, 5);
res = post_tab->insert( std::make_pair(name, value) ); res = post_tab->insert( std::make_pair(name, value) );
added = res.second; added = res.second;
var_index += 1; var_index += 1;