Skip to content

Commit f02c267

Browse files
committed
Fixes and improvements of core files
1 parent a47fa20 commit f02c267

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/io/OutBitStream.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ namespace lsp
234234

235235
size_t written = 0;
236236

237-
#if defined(ARCH_X86)
237+
#ifdef LSP_UNALIGNED_MEMORY_SAFE
238238
// x86 allows unaligned access, write with machine words first
239239
const umword_t *wptr = reinterpret_cast<const umword_t *>(buf);
240240
size_t blocks = count & (~(sizeof(umword_t) - 1));
@@ -250,7 +250,7 @@ namespace lsp
250250
}
251251

252252
buf = wptr;
253-
#endif /* ARCH_X86 */
253+
#endif /* LSP_UNALIGNED_MEMORY_SAFE */
254254

255255
// Write the rest data with bytes
256256
const uint8_t *bptr = reinterpret_cast<const uint8_t *>(buf);
@@ -274,7 +274,7 @@ namespace lsp
274274

275275
size_t written = 0;
276276

277-
#if defined(ARCH_X86)
277+
#ifdef LSP_UNALIGNED_MEMORY_SAFE
278278
// x86 allows unaligned memory access, write with machine words first
279279
const umword_t *wptr = reinterpret_cast<const umword_t *>(buf);
280280
size_t blocks = bits & (~((sizeof(umword_t) << 3) - 1));
@@ -289,7 +289,7 @@ namespace lsp
289289
}
290290

291291
buf = wptr;
292-
#endif
292+
#endif /* LSP_UNALIGNED_MEMORY_SAFE */
293293

294294
// Write the rest data with bytes
295295
const uint8_t *bptr = reinterpret_cast<const uint8_t *>(buf);

src/main/io/Path.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2024 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-runtime-lib
66
* Created on: 8 февр. 2019 г.
@@ -1601,7 +1601,7 @@ namespace lsp
16011601
{
16021602
fattr_t attr;
16031603
status_t res = File::stat(&sPath, &attr);
1604-
return (res != STATUS_OK) ? attr.size : -res;
1604+
return (res == STATUS_OK) ? attr.size : -res;
16051605
}
16061606

16071607
bool Path::exists() const

0 commit comments

Comments
 (0)