jingoro2112 / wrench

practical embedded script interpreter
MIT License
99 stars 10 forks source link

free() instead of g_free()? #38

Closed khevessy closed 2 weeks ago

khevessy commented 2 weeks ago

After commit 76c5ced, when running wr_compile() for previously working code, we get a hard fault in the destructor of WRstr class, shouldn't be there g_free() instead of free()? working: ~WRstr() { if ( m_str != m_smallbuf ) g_free(m_str); } not working: ~WRstr() { if ( m_str != m_smallbuf ) free(m_str); }

jingoro2112 commented 2 weeks ago

fixed this instance, and also a few others I had missed. I will be more careful going forward.

khevessy commented 2 weeks ago

Thanks!