Properly restore the LC_NUMERIC locale after finalizing.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 6 Apr 2014 21:58:54 +0000 (23:58 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 6 Apr 2014 21:58:54 +0000 (23:58 +0200)
commit041500231054441f851b7c7260ab815dae6fb368
tree408629b3c0db478fa4356ddd1079790198da4cdc
parent1b46606b3c5d6a7a97528a53d0309d3cd04df62b
Properly restore the LC_NUMERIC locale after finalizing.

There were two issues here:

 1. setlocale(LC_NUMERIC, "C") always returns C, not the previous
    locale.
 2. The return value of setlocale() may point into static storage,
    which may be corrupted when we call into libGL, if e.g.
    the shader compiler calls setlocale() on its own.

Patch by Jean-Baptiste Mardelle.
effect_chain.cpp