Skip to content

Commit

Permalink
fix 4757.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Aug 20, 2016
1 parent 403eab5 commit 0f8ce0b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
drkns 20.08.2016 14:01:57 +0200 - build 4764

1. Уточнение 4757.1.

drkns 19.08.2016 09:45:27 +0200 - build 4763

1. Уточнение 4762.
Expand Down
6 changes: 6 additions & 0 deletions far/encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,5 +801,11 @@ size_t Utf8::get_bytes(const wchar_t* const Data, size_t const DataSize, char* c

void swap_bytes(const void* const Src, void* const Dst, const size_t SizeInBytes)
{
if (!SizeInBytes)
{
// Ucrt for unknown reason aggressively validates that 'source' and 'destination' are not nullptr even if 'bytes' is 0.
// It's safer to not call it.
return;
}
_swab(reinterpret_cast<char*>(const_cast<void*>(Src)), reinterpret_cast<char*>(Dst), static_cast<int>(SizeInBytes));
}
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m4_define(BUILD,4763)m4_dnl
m4_define(BUILD,4764)m4_dnl

0 comments on commit 0f8ce0b

Please sign in to comment.