summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2018-01-02 06:13:25 -0600
committerepoch <epoch@hacking.allowed.org>2018-01-02 06:13:25 -0600
commitd8dccfbf84061f0a6e5d0b5b86f0662ab49bca6e (patch)
tree0a7eb0147bf77c5280be7cbf4690dce85195cbff
parentbb17403496d39d467b6737880c928e020a50aaec (diff)
downloadhackvr-d8dccfbf84061f0a6e5d0b5b86f0662ab49bca6e.tar.gz
hackvr-d8dccfbf84061f0a6e5d0b5b86f0662ab49bca6e.zip
added group rotation deletion inside deleteallexcept
-rw-r--r--src/hackvr.c12
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;
}