Skip to content

Commit

Permalink
Fixed printf issue (KhronosGroup#2)
Browse files Browse the repository at this point in the history
Replaced printf with printf_s for Windows
  • Loading branch information
SergioRZMasson authored Dec 8, 2023
1 parent 1cb5278 commit 3736b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spirv_hlsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10264,7 +10264,7 @@ string CompilerHLSL::convert_float_to_string(const SPIRConstant &c, uint32_t col

char print_buffer[32];
#ifdef _WIN32
sprintf(print_buffer, "0x%xu", c.scalar(col, row));
sprintf_s(print_buffer, "0x%xu", c.scalar(col, row));
#else
snprintf(print_buffer, sizeof(print_buffer), "0x%xu", c.scalar(col, row));
#endif
Expand Down

0 comments on commit 3736b84

Please sign in to comment.