int offset;
int height = SCREEN_HEIGHT (screen);
- if (amount > 0)
- limit += amount;
- if (! scroll_region_ok)
- limit = height;
-
if (amount == 0)
return 0;
+ if (! scroll_region_ok)
+ limit = height;
+ else if (amount > 0)
+ limit += amount;
+
if (amount < 0)
{
int temp = to;
register int insert_overhead = ov1 * 10;
register int next_insert_cost = ovn * 10;
- for (i = 0; i <= screen_height; i++)
+ for (i = 0; i < screen_height; i++)
{
mf[screen_height - i] = next_insert_cost / 10;
next_insert_cost += pfn;