In the block in line 72, a dummy relocation entry is added for the end iterator. This is causing a problem because it has a relocation type that, for instance, if it is IMAGE_REL_I386_REL32, will try to be resolved later in the resolveRelocation function, which breaks some calculations because this dummy entry has invalid values, specifically the sectionA, which is -1.
Thus, I'm changing the relocation type to absolute, which in fact does no calculations.
However, I think that it might make sense not to include this dummy relocation entry. Removing it works with what i try to debug, but I don't know all the implications of this.