View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002781 | Far Manager | _Common | public | 2014-08-29 13:12 | 2015-01-05 09:31 |
Reporter | Maximus | Assigned To | DrKnS | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86 | OS | Windows | OS Version | 8 |
Product Version | 3.0 | ||||
Fixed in Version | 3.0 | ||||
Summary | 0002781: Exception при работе под отладчиком VS2013 | ||||
Description | Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. If this was intentional, you should mask the source of the cast with the appropriate bitmask. Приведение к (WORD) вызывает ругань отладчика (exceptions) если сие обрезает не маскированные заранее биты. | ||||
Tags | No tags attached. | ||||
Build | 4130 | ||||
|
mantis-Run-Time-Check-Failure.patch (1,351 bytes)
From e3bb481fb55dd76bdae40343159f85c777af9617 Mon Sep 17 00:00:00 2001 From: Maximus5 <ConEmu.Maximus5@gmail.com> Date: Fri, 29 Aug 2014 00:52:10 +0400 Subject: [PATCH] Far3bis. Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data --- unicode_far/colormix.cpp | 2 +- unicode_far/headers.hpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/unicode_far/colormix.cpp b/unicode_far/colormix.cpp index 101009b..b5a4318 100644 --- a/unicode_far/colormix.cpp +++ b/unicode_far/colormix.cpp @@ -143,7 +143,7 @@ WORD Colors::FarColorToConsoleColor(const FarColor& Color) Result = (IndexColors[0] << ConsoleBgShift) | (IndexColors[1] << ConsoleFgShift); } - return (WORD)(Result | ((WORD)(Color.Flags) & ConsoleExtraMask)); + return (WORD)(Result | ((WORD)(Color.Flags & ConsoleExtraMask))); } FarColor Colors::ConsoleColorToFarColor(WORD Color) diff --git a/unicode_far/headers.hpp b/unicode_far/headers.hpp index 5f9eb11..a08b594 100644 --- a/unicode_far/headers.hpp +++ b/unicode_far/headers.hpp @@ -178,6 +178,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include "SDK/sdk.gcc.h" #endif // __GNUC__ +#undef GetGValue +#define GetGValue(rgb) (LOBYTE((rgb) >> 8)) + #include "cpp.hpp" #include "common.hpp" -- 1.8.5.2.msysgit.0 |
|
А почему собственно патч не полностью применили? |
|
|
|
? |
|
headers.hpp +#undef GetGValue +#define GetGValue(rgb) (LOBYTE((rgb) >> 8)) + |
|
А какое отношение это имеет к "Exception при работе под отладчиком VS2013"? |
|
Прямое. Ексепшн на скриншоте видно? Дефайн в винапи как-то не рассчитан на 32бита. |
|
Ok, 4129. |
|
для little-endian порядок байт в abgr должен быть обратным ? |
|
4130. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-08-29 13:12 | Maximus | New Issue | |
2014-08-29 13:12 | Maximus | File Added: mantis-Run-Time-Check-Failure.patch | |
2014-08-30 11:05 | DrKnS | Build | => 4071 |
2014-08-30 11:05 | DrKnS | Status | new => closed |
2014-08-30 11:05 | DrKnS | Assigned To | => DrKnS |
2014-08-30 11:05 | DrKnS | Resolution | open => fixed |
2014-08-30 11:05 | DrKnS | Fixed in Version | => 3.0 |
2014-10-08 06:44 | Maximus | Note Added: 0013067 | |
2014-10-08 06:44 | Maximus | Status | closed => feedback |
2014-10-08 06:44 | Maximus | Resolution | fixed => reopened |
2014-10-08 06:45 | Maximus | File Added: 2014-10-08_10-45-13.png | |
2014-10-08 14:55 | DrKnS | Note Added: 0013069 | |
2014-10-08 15:05 | Maximus | Note Added: 0013070 | |
2014-10-08 15:05 | Maximus | Status | feedback => assigned |
2014-10-08 15:13 | DrKnS | Note Added: 0013071 | |
2014-10-08 15:15 | Maximus | Note Added: 0013072 | |
2014-10-08 16:58 | DrKnS | Note Added: 0013073 | |
2014-10-08 16:58 | DrKnS | Status | assigned => feedback |
2014-10-08 22:19 | 2useven10 | Note Added: 0013075 | |
2014-10-08 22:19 | 2useven10 | Note Edited: 0013075 | |
2014-10-08 22:55 | DrKnS | Note Added: 0013077 | |
2015-01-05 09:31 | DrKnS | Build | 4071 => 4130 |
2015-01-05 09:31 | DrKnS | Status | feedback => closed |
2015-01-05 09:31 | DrKnS | Resolution | reopened => fixed |