[clangd] RIFF.cpp - Use logical && instead of bitwise & for padding check

Fixes PR47070
This commit is contained in:
Simon Pilgrim 2020-08-11 11:36:21 +01:00
parent 419f1be7b5
commit 73a6a36469
1 changed files with 1 additions and 1 deletions

View File

@ -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();