AVALANCHE: Fix out of bound access related to Pascal to C conversion