Rich,
In this function, there are two arrays that are carved out of extraseg: same and colour.
What are the maximum indices into these arrays?
The same[] array appears to be indexed from 0 to xdots.
However, when colour is carved out of extraseg after same, it is done with this code:
same = (int far *)MK_FP(extraseg,0); colour = &same[ydots];
This seems to carve out an array for same[] that is ydots long. This is all fine and dandy as long as ydots > xdots, which it is for real video modes, but not necessarily for disk video modes.
Hmm. I think all we have is pointers. The colour pointer starts at an address that is ydots integers after the starting location of the same pointer. You are correct, if ydots <= xdots, we'll overlap the data.
The same array is only indexed by what looks like an x coordinate, so I think this is a typo and should be xdots and not ydots.
I agree. From the patch history, it looks like Tim worked this magic (patch 1826p12.dif), although the original code is by Paul (de Leeuw). They may be able to add more insight.
I will make this change on the branch; should it be fixed on the HEAD?
It looks to me like it should be fixed on the HEAD also. Jonathan