Fix the ugly "Bug! (e)" message for script added production. Makes watching autogames really annoying.

master
Per Inge Mathisen 2010-10-17 16:06:47 +02:00
parent 1ef4fe7b59
commit 6f25802553
1 changed files with 2 additions and 2 deletions

View File

@ -336,9 +336,9 @@ void intUpdateQuantity(WIDGET *psWidget, W_CONTEXT *psContext)
Quantity = getProductionQuantity(Structure, psTemplate);
Built = getProductionBuilt(Structure, psTemplate);
snprintf(Label->aText, sizeof(Label->aText), "%02d", Quantity - Built);
if (Quantity - Built <= 0)
if (Quantity - Built <= 0) // zero is always the case for script added production
{
snprintf(Label->aText, sizeof(Label->aText), "BUG! (e) %d-%d", Quantity, Built);
sstrcpy(Label->aText, "01");
}
Label->style &= ~WIDG_HIDDEN;
}