OK, this is weird. I happened across a glitch in my code after this was all done...
The following code
shouldn't have worked...
void demote(char *newPriLbl)
{ char **newLblArray = new char*[NumLabels+1];
newLblArray[0] = newPriLbl;
for (unsigned short i=0; i < NumLabels; i++)
newLblArray[i+1] = label;
label = newLblArray;
NumLabels++;
char *FirstAlt = new char[strlen(label[1])];
strcpy(FirstAlt, "+");
strcat(FirstAlt, label[1]);
delete label[1];
label[1] = FirstAlt;
}
(I'd think I'd have wanted to do this instead:)
void demote(char *newPriLbl)
{ char **newLblArray = new char*[NumLabels+1];
newLblArray[0] = newPriLbl;
for (unsigned short i=0; i < NumLabels; i++)
newLblArray[i+1] = label;
label = newLblArray;
NumLabels++;
char *FirstAlt = new char[strlen(label[1])+1];
strcpy(FirstAlt, "+");
strcat(FirstAlt, label[1]);
delete label[1];
label[1] = FirstAlt;
}
...but it did work.
(Was I just smashing the stack without realizing it, with no ill effects?)From what I saw of the diffs, I saw no glitches at the end of the demoted labels (former primary labels, now the first AltLabels).
But let's keep our eyes peeled, eh?
If bad comes to worse and we *do* find glitches, I can just fix my code and rerun the program.
And the advantage to that would be, no need to worry about merge conflicts.