Project

General

Profile

Revision 116

fixed strange error on 3rd function that would cause SEGFAULTS when running commands

View differences:

lab5.c
172 172

  
173 173
    if (vbe_get_mode_information(mode)) {
174 174
        printf("%s: failed to get information for mode %x.\n", __func__, mode);
175
        if (vg_exit()) printf("%s: vg_exit failed to exit to text mode.\n", __func__);
175
        if (vg_exit())
176
            printf("%s: vg_exit failed to exit to text mode.\n", __func__);
176 177
        return 1;
177 178
    }
178 179

  
......
182 183
        printf("%s: failed to set graphic mode %x.\n", __func__, mode);
183 184
        if (vg_exit()) printf("%s: vg_exit failed to exit to text mode.\n", __func__);
184 185
        return 1;
185
    }
186
    };
186 187

  
188

  
189

  
190

  
187 191
    uint16_t W = get_XRes()/no_rectangles;
188 192
    uint16_t H = get_YRes()/no_rectangles;
193

  
189 194
    uint32_t color, R, G, B;
190 195
    for(uint8_t row = 0; row < no_rectangles; ++row){
191 196
        for(uint8_t col = 0; col < no_rectangles; ++col){
......
206 211
            }
207 212
        }
208 213
    }
209

  
210 214
    /// loop stuff
211 215
    int ipc_status;
212 216
    message msg;

Also available in: Unified diff