CID 22466 Division or modulo by zero

This commit is contained in:
Enno Rehling 2015-11-03 23:17:11 +01:00
parent 103c480c91
commit 1f055b3175
1 changed files with 1 additions and 2 deletions

View File

@ -421,8 +421,7 @@ const char *abkz(const char *s, char *buf, size_t buflen, size_t maxchars)
}
/* Buchstaben pro Teilkürzel = _max(1,max/AnzWort) */
bpt = _max(1, maxchars / c);
bpt = (c > 0) ? _max(1, maxchars / c) : 1;
/* Einzelne Wörter anspringen und jeweils die ersten BpT kopieren */