quiz: handle line continuation in data files correctly, switch to getline(3)
authornaddy <naddy@openbsd.org>
Thu, 11 Mar 2021 21:18:25 +0000 (21:18 +0000)
committernaddy <naddy@openbsd.org>
Thu, 11 Mar 2021 21:18:25 +0000 (21:18 +0000)
commit5a0076c3c81ddf2f5d67607053ad76c062c6dde5
treea3ccd30447244e1f1a3ee03d28efd0eec82958fc
parent6e9d37276900b89a1732a8ab39839591b01d9eef
quiz: handle line continuation in data files correctly, switch to getline(3)

Specifically, the following quiz.db line

foo:\
bar

was parsed into "foo:bar\n", which made it impossible to answer correctly.

Bug reported and inital fix from Alex Karle, partially reworked by
yours truly, further input from millert@
games/quiz/quiz.c