View | Details | Raw Unified | Return to bug 17316
Collapse All | Expand All

(-)src/main/gevents.c (-2 / +2 lines)
Lines 56-62 Link Here
56
    checkArity(op, args);
56
    checkArity(op, args);
57
57
58
    devnum = INTEGER(CAR(args))[0] - 1;
58
    devnum = INTEGER(CAR(args))[0] - 1;
59
    if(devnum < 1 || devnum > R_MaxDevices)
59
    if(devnum < 1 || devnum >= R_MaxDevices)
60
	error(_("invalid graphical device number"));
60
	error(_("invalid graphical device number"));
61
61
62
    gdd = GEgetDevice(devnum);
62
    gdd = GEgetDevice(devnum);
Lines 98-104 Link Here
98
    if(devnum == NA_INTEGER)
98
    if(devnum == NA_INTEGER)
99
	error(_("invalid graphical device number"));
99
	error(_("invalid graphical device number"));
100
    devnum--;
100
    devnum--;
101
    if(devnum < 1 || devnum > R_MaxDevices)
101
    if(devnum < 1 || devnum >= R_MaxDevices)
102
	error(_("invalid graphical device number"));
102
	error(_("invalid graphical device number"));
103
103
104
    gdd = GEgetDevice(devnum);
104
    gdd = GEgetDevice(devnum);

Return to bug 17316