nostrdb: relay-index: fix a few bugs
There were a few race conditions and lmdb bugs in the relay index implementation. Fix those! Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
c29027ff5b
commit
f0521ba406
@@ -24,8 +24,10 @@ struct ndb_content_parser {
|
||||
|
||||
static int parse_digit(struct cursor *cur, int *digit) {
|
||||
int c;
|
||||
if ((c = peek_char(cur, 0)) == -1)
|
||||
if ((c = peek_char(cur, 0)) == -1) {
|
||||
*digit = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
c -= '0';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user