summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/shader.cpp')
-rw-r--r--3rdparty/bgfx/src/shader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdparty/bgfx/src/shader.cpp b/3rdparty/bgfx/src/shader.cpp
index 03a1d05faa2..76493223590 100644
--- a/3rdparty/bgfx/src/shader.cpp
+++ b/3rdparty/bgfx/src/shader.cpp
@@ -15,7 +15,7 @@ namespace bgfx
bx::WriterI* writer = reinterpret_cast<bx::WriterI*>(_userData);
char temp[512];
toString(temp, sizeof(temp), _instruction);
- bx::write(writer, temp, (int32_t)strlen(temp) );
+ bx::write(writer, temp, (int32_t)bx::strnlen(temp) );
return true;
}
@@ -24,7 +24,7 @@ namespace bgfx
bx::WriterI* writer = reinterpret_cast<bx::WriterI*>(_userData);
char temp[512];
toString(temp, sizeof(temp), _instruction);
- bx::write(writer, temp, (int32_t)strlen(temp) );
+ bx::write(writer, temp, (int32_t)bx::strnlen(temp) );
return true;
}
@@ -33,7 +33,7 @@ namespace bgfx
bx::WriterI* writer = reinterpret_cast<bx::WriterI*>(_userData);
char temp[512];
toString(temp, sizeof(temp), _instruction);
- bx::write(writer, temp, (int32_t)strlen(temp) );
+ bx::write(writer, temp, (int32_t)bx::strnlen(temp) );
return true;
}
@@ -85,7 +85,7 @@ namespace bgfx
for (uint32_t ii = 0; ii < count; ++ii)
{
- uint8_t nameSize;
+ uint8_t nameSize = 0;
bx::read(_reader, nameSize, _err);
if (!_err->isOk() ) { return; }