]> git.pond.sub.org Git - empserver/commit
prnatid: Recover from getnatp() failure
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 14 Jan 2013 22:18:11 +0000 (23:18 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 6 Jun 2013 17:52:26 +0000 (19:52 +0200)
commit44fbf6cd305da65a0e2f753f24fde8f421bf8226
treedff9318d980af0de76c1ff863f138127af54055b
parent61a32b8b6950120c6376925ff6298b70a71abffe
prnatid: Recover from getnatp() failure

cname() calls getnatp(), and returns a null pointer when it fails.
Some systems (GNU, Windows) deal gracefully with printing null
strings, others crash.

Because we keep table EF_NATION entirely in memory, getnatp() should
fail only on invalid country number.

Rewrite prnatid() to catch this error and recover.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/natsub.c