commit - 8b6ce5317fdcb3b74ddbd460aee729f039fe9aa7
commit + 74ad6a6944bd0588c940347378cc2b713a89ec95
blob - 5491daca7ddd634de43ca8d3f1030e4115db3f35
blob + 23c9144b4f1d0b6f1c12b6cbfb0ee1af139d4671
--- lib/diff_main.c
+++ lib/diff_main.c
int flags = (left->root->diff_flags | right->root->diff_flags);
bool ignore_whitespace = (flags & DIFF_FLAG_IGNORE_WHITESPACE);
+ if (!left->len && !right->len) {
+ *cmp = 0;
+ return 0;
+ }
if (!ignore_whitespace) {
- if (!left->len && !right->len) {
- *cmp = 0;
- return 0;
- }
if (!right->len) {
*cmp = 1;
return 0;