|
Boost : |
Subject: Re: [boost] [Boost-commit] svn:boost r78033 - trunk/libs/context/src
From: Joshua Boyce (raptorfactor_at_[hidden])
Date: 2012-04-17 04:53:30
On Tue, Apr 17, 2012 at 5:31 PM, <oliver.kowalke_at_[hidden]> wrote:
> Author: olli
> Date: 2012-04-17 03:31:34 EDT (Tue, 17 Apr 2012)
> New Revision: 78033
> URL: http://svn.boost.org/trac/boost/changeset/78033
>
> Log:
> icontext: use snprintf in seh handler
>
> Text files modified:
> trunk/libs/context/src/seh.cpp | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> Modified: trunk/libs/context/src/seh.cpp
>
> ==============================================================================
> --- trunk/libs/context/src/seh.cpp (original)
> +++ trunk/libs/context/src/seh.cpp 2012-04-17 03:31:34 EDT (Tue, 17
> Apr 2012)
> @@ -26,7 +26,7 @@
> {
> const char * accessType = ( info[0]) ? "writing" : "reading";
> const ULONG_PTR address = info[1];
> - _snprintf_s( description, len, _TRUNCATE, "Access violation %s
> 0x%08X", accessType, address);
> + snprintf( description, len, "Access violation %s 0x%08X",
> accessType, address);
> return description;
> }
> case EXCEPTION_DATATYPE_MISALIGNMENT: return "Datatype
> misalignment";
> @@ -52,8 +52,7 @@
> case EXCEPTION_INVALID_HANDLE: return "Invalid handle";
> }
>
> - _snprintf_s( description, len, _TRUNCATE, "Unknown (0x%08X)", code);
> -
> + snprintf( description, len, "Unknown (0x%08X)", code);
> return description;
> }
>
> _______________________________________________
> Boost-commit mailing list
> Boost-commit_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-commit
This breaks building under MSVC which does not have 'snprintf', only
'_snprintf'.
http://msdn.microsoft.com/en-us/library/2ts7cx93.aspx
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk