Commit Graph

2 Commits (0c6a838c6f994614db2e03aedbb153d775fac3b0)

Author SHA1 Message Date
Esteban Papp 0c6a838c6f fix warnigns after merge
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
galibzon 2b5f77683c
[ATOM-13679] ShaderAssetBuilder: Create UnitTest To Validate (#3096)
* [ATOM-13679] ShaderAssetBuilder: Create UnitTest To Validate
 STDOUT Data Capture From MCPP

azvsnprintf was being used improperly, in particular
in windows if the data to print was larger than the
local buffer in the stack, then azvsnprintf returns -1.

Also azvsnprintf needs a +1 in buffer size to accomodate for
the '\0' character at the end and that was not done.

Added UnitTest to validate all cases:
1. Data to print is smaller than the local buffer.
2. Data to print is the same size as the local buffer.
3. Data to print is bigger than the local buffer.

Signed-off-by: garrieta <garrieta@amazon.com>

* Fix for MacOS & Linux,
they require va_start to be called each time azvsnprintf is called

Signed-off-by: garrieta <garrieta@amazon.com>
4 years ago