diff --git a/c/xlib/gcontext.c b/c/xlib/gcontext.c index eb347f0..2c6b1c0 100644 --- a/c/xlib/gcontext.c +++ b/c/xlib/gcontext.c @@ -280,10 +280,12 @@ s48_value scx_Change_Gc(s48_value display, s48_value gc, s48_value values) { s48_value scx_Get_Gc_Values(s48_value display, s48_value gc, s48_value values) { unsigned long mask = 0; + s48_value i; XGCValues GCV; - S48_DECLARE_GC_PROTECT_3(display, gc, values); - for (; values != S48_NULL; values = S48_CDR(values)) - mask |= (1L << scx_extract_gc_value(S48_CAR(values))); + S48_DECLARE_GC_PROTECT_4(display, gc, values, i); + + for (i = values; i != S48_NULL; i = S48_CDR(i)) + mask |= (1L << scx_extract_gc_value(S48_CAR(i))); if (!XGetGCValues(scx_extract_display(display), scx_extract_gc(gc),