lua : fix char array types being handled like char* causing crashes

fix bug #9975