From 33cca3ec0de7e4c1bbbf35a63bb4853254d316b5 Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 4 Feb 2018 14:15:58 +0100 Subject: Proper decoding of BCalc errors (forcing ANSI) --- src/DDTable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DDTable.cs b/src/DDTable.cs index 95cf15e..c2ffcd1 100644 --- a/src/DDTable.cs +++ b/src/DDTable.cs @@ -67,7 +67,7 @@ namespace BCDD { BCalcWrapper.bcalcDDS_setPlayerOnLeadAndReset(solver, BCalcWrapper.bcalc_declarerToLeader(player)); result[player, denom] = 13 - BCalcWrapper.bcalcDDS_getTricksToTake(solver); - String error = Marshal.PtrToStringAuto(BCalcWrapper.bcalcDDS_getLastError(solver)); + String error = Marshal.PtrToStringAnsi(BCalcWrapper.bcalcDDS_getLastError(solver)); if (error != null) { throw new DDTableInvalidException("BCalc error: " + error); -- cgit v1.2.3