diff options
-rw-r--r-- | src/hackvr.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/hackvr.c b/src/hackvr.c index 5ce9a52..7ae6616 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -174,7 +174,17 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw, ret=1; //now do the same stuff but for the group_rot structs. for(j=0;global.group_rot[j];j++) { - + if(strcmp(global.group_rot[j]->id,a[2])) { + free(global.group_rot[j]->id); + free(global.group_rot[j]); + global.group_rot[j]=0; + } + } + for(k=0;k<j;k++) { + if(global.group_rot[k]) continue; + for(l=k;global.group_rot[l] == 0 && l<j;l++); + global.group_rot[k]=global.group_rot[l]; + global.group_rot[l]=0; } continue; } |