diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2019-11-21 19:53:50 +0200 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2019-11-21 19:53:50 +0200 |
| commit | 8935760fb926ed084b14db6327cf4ac633e82d2c (patch) | |
| tree | 0f60447b5784823339cb48516d7ebfcc8cf437a2 | |
| parent | beed591e60224655f38ed4cef14ec4a0a755e7e1 (diff) | |
| download | weather-8935760fb926ed084b14db6327cf4ac633e82d2c.tar.gz weather-8935760fb926ed084b14db6327cf4ac633e82d2c.zip | |
update_database: fix bug in reading data
| -rw-r--r-- | src/update_database.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/update_database.nim b/src/update_database.nim index e3eae37..a5e5078 100644 --- a/src/update_database.nim +++ b/src/update_database.nim @@ -49,7 +49,7 @@ proc readData(): string = if size == 0: return "" result = newString(size) - if readBuffer(stdin, addr result[0], size) != 0: + if readBuffer(stdin, addr result[0], size) != size: raise newCgiError(400, "not enough data") proc main() = |
