Fixed char.c compilation error in MSVC <= 2012

Signed-off-by: TungSinpei <TungSinpei@hotmail.com>
Merge pull request #395 from QQfoolsorellina/master

Fixed char.c compilation error in MSVC <= 2012
In mapindex move check for default map into separate method.