mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
bitcoin/script: don't memcmp NULL.
Stupid, stupid C committee. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
2005ca436e
commit
1f8a4bed39
1 changed files with 2 additions and 0 deletions
|
@ -884,5 +884,7 @@ bool scripteq(const u8 *s1, const u8 *s2)
|
|||
|
||||
if (tal_count(s1) != tal_count(s2))
|
||||
return false;
|
||||
if (tal_count(s1) == 0)
|
||||
return true;
|
||||
return memcmp(s1, s2, tal_count(s1)) == 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue