forked from OSchip/llvm-project
[clangd] RIFF.cpp - Use logical && instead of bitwise & for padding check
Fixes PR47070
This commit is contained in:
parent
419f1be7b5
commit
73a6a36469
|
@ -33,7 +33,7 @@ llvm::Expected<Chunk> readChunk(llvm::StringRef &Stream) {
|
|||
llvm::Twine(Stream.size()));
|
||||
C.Data = Stream.take_front(Len);
|
||||
Stream = Stream.drop_front(Len);
|
||||
if (Len % 2 & !Stream.empty()) { // Skip padding byte.
|
||||
if ((Len % 2) && !Stream.empty()) { // Skip padding byte.
|
||||
if (Stream.front())
|
||||
return makeError("nonzero padding byte");
|
||||
Stream = Stream.drop_front();
|
||||
|
|
Loading…
Reference in New Issue