kripken/emscripten — pull request #2138 by TV4Fun (2014-02-19 08:59:30+00:00)
Title: Fix errors in locale and allocate, and a few other tweaks

This fixes issue #2134 by allocating more space to the structure returned by localeconv. This fixes an error caused by some locale functions (specifically moneypunct_byname::init trying to access members of the lconv struct beyond the first and dereferencing invalid pointers. This also fixes a bug in allocate() which occurred when allocating a single-typed array of data of type size greater than one byte. The function had been incrementing its index into the array by the byte size, causing it to skip elements in arrays of larger type sizes. This also adds support for calling GL functions with the OES extension.