We present here a two-dimensional numerical simulation of a hydrogenated amorphous silicon p-i-n solar cell non-uniformly illuminated through the p-layer. This simulation is used to show the effect of the presence of dark regions in the illuminated surface on the electrical behaviour of the device. The continuity equations for holes and electrons together with Poisson's equation, implemented with a recombination mechanism reflecting the amorphous structure of the material, are solved using standard numerical techniques over a rectangular domain. The results obtained reveal the appearance of a lateral component of the electric field and current density vectors inside the structure. The effect of such components is a lateral carrier flow of electrons inside the intrinsic layer and of holes inside the p-layer, resulting in leakage of the transverse current collected at the contacts and an increase in the series resistance.