Tracer des diagrammes dans un terminal - retour accueil
git clone git://bebou.netlib.re/boxes
Log | Files | Refs | README |
commit ce7d5c67c59b090d049d214abae0c21980010b2f parent 4524a6b416a91584cee2250c76749a7242ab95aa Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Fri, 13 Jun 2025 22:12:50 +0200 Correction regression ctrl-z dans les négatifs Diffstat:
M | boxes.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boxes.c b/boxes.c @@ -40,7 +40,7 @@ void addbox(struct pile *boxes, struct box b) { void deletebox(struct pile *boxes, int index) { for (int i=index;i<boxes->count-1;i++) boxes->list[i]=boxes->list[i+1]; - boxes->count--; + boxes->count=max(0,boxes->count-1); } int main(int argc, char **argv) {