mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fix wasm tinystl compile error (#3406)
* utilize bx::strLen instead of C function * utilize bx::strCopy instead of C function
This commit is contained in:
@@ -31,8 +31,9 @@ namespace bgfx { namespace gl
|
||||
SwapChainGL(int _context, const char* _canvas)
|
||||
: m_context(_context)
|
||||
{
|
||||
m_canvas = (char*)bx::alloc(g_allocator, strlen(_canvas) + 1);
|
||||
strcpy(m_canvas, _canvas);
|
||||
size_t length = bx::strLen(_canvas) + 1;
|
||||
m_canvas = (char*)bx::alloc(g_allocator, length);
|
||||
bx::strCopy(m_canvas, length, _canvas);
|
||||
|
||||
makeCurrent();
|
||||
GL_CHECK(glClearColor(0.0f, 0.0f, 0.0f, 0.0f) );
|
||||
|
||||
Reference in New Issue
Block a user