When debugging or running an application using the IDE with range checking
enabled, Delphi throws "range check error" exceptions because some of the
results assigned to buf[] exceed byte range.
This change solves the issue:
// reverse process of above
buf[0] := (((Base64Map[data[i]] shl byte(2)) or (Base64Map[data[i + 1]] shr byte(4)))) and $FF;
buf[1] := ((Base64Map[data[i + 1]] shl 4) or (Base64Map[data[i + 2]] shr 2)) and $FF;
buf[2] := ((Base64Map[data[i + 2]] shl 6) or (Base64Map[data[i + 3]])) and $FF;
Original issue reported on code.google.com by schnaade...@gmail.com on 16 Mar 2012 at 3:26
Original issue reported on code.google.com by
schnaade...@gmail.com
on 16 Mar 2012 at 3:26