From dd2810d60af6fd49946dd6992536aa4fb14cb7f0 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 7 Mar 2014 06:58:33 +0000 Subject: [PATCH] build 30 - with Clara fix for null deref crash --- README.md | 2 +- include/internal/catch_version.hpp | 2 +- include/internal/clara.h | 5 +++-- single_include/catch.hpp | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 33901df2..d12d676a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![catch logo](catch-logo-small.png) -*v1.0 build 29 (master branch)* +*v1.0 build 30 (master branch)* Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch) diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index b19a036e..85181d64 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -13,7 +13,7 @@ namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 1, 0, 29, "master" ); + Version libraryVersion( 1, 0, 30, "master" ); } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED diff --git a/include/internal/clara.h b/include/internal/clara.h index 476f2343..a8b50575 100644 --- a/include/internal/clara.h +++ b/include/internal/clara.h @@ -176,6 +176,7 @@ namespace Tbc { #undef STITCH_TBC_TEXT_FORMAT_OPEN_NAMESPACE + #include #include #include @@ -261,9 +262,9 @@ namespace Clara { public: BoundArgFunction() : functionObj( NULL ) {} BoundArgFunction( IArgFunction* _functionObj ) : functionObj( _functionObj ) {} - BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj->clone() ) {} + BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : NULL ) {} BoundArgFunction& operator = ( BoundArgFunction const& other ) { - IArgFunction* newFunctionObj = other.functionObj->clone(); + IArgFunction* newFunctionObj = other.functionObj ? other.functionObj->clone() : NULL; delete functionObj; functionObj = newFunctionObj; return *this; diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 85b99843..20b25027 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v1.0 build 29 (master branch) - * Generated: 2014-03-06 21:52:26.886365 + * CATCH v1.0 build 30 (master branch) + * Generated: 2014-03-07 06:56:50.010459 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -3271,9 +3271,9 @@ namespace Clara { public: BoundArgFunction() : functionObj( NULL ) {} BoundArgFunction( IArgFunction* _functionObj ) : functionObj( _functionObj ) {} - BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj->clone() ) {} + BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : NULL ) {} BoundArgFunction& operator = ( BoundArgFunction const& other ) { - IArgFunction* newFunctionObj = other.functionObj->clone(); + IArgFunction* newFunctionObj = other.functionObj ? other.functionObj->clone() : NULL; delete functionObj; functionObj = newFunctionObj; return *this; @@ -6588,7 +6588,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 1, 0, 29, "master" ); + Version libraryVersion( 1, 0, 30, "master" ); } // #included from: catch_message.hpp