diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-08-07 20:23:07 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-08-07 20:23:07 +0000 |
commit | b31aaa377282d63b9f4a6bd22f54257180fbad59 (patch) | |
tree | 371fd12f9a9711fab9676659ac3ebb0fe6073d94 /ACE/ace/ETCL | |
parent | 08fff03cd764ca68f8a1bc35a82020ced9508e07 (diff) | |
download | ATCD-b31aaa377282d63b9f4a6bd22f54257180fbad59.tar.gz |
ChangeLogTag: Thu Aug 7 20:21:29 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'ACE/ace/ETCL')
-rw-r--r-- | ACE/ace/ETCL/ETCL_Interpreter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ACE/ace/ETCL/ETCL_Interpreter.cpp b/ACE/ace/ETCL/ETCL_Interpreter.cpp index 156bc819c96..e7ae9a7d016 100644 --- a/ACE/ace/ETCL/ETCL_Interpreter.cpp +++ b/ACE/ace/ETCL/ETCL_Interpreter.cpp @@ -2,6 +2,7 @@ // $Id$ #include "ace/Guard_T.h" +#include "ace/Truncate.h" #include "ace/ETCL/ETCL_Interpreter.h" #include "ace/ETCL/ETCL_Constraint.h" @@ -83,7 +84,10 @@ int Lex_String_Input::copy_into (char* buf, int max_size) { - int chars_left = Lex_String_Input::end_ - Lex_String_Input::current_; + int chars_left = + ACE_Utils::truncate_cast<int> ( + Lex_String_Input::end_ - Lex_String_Input::current_); + int n = max_size > chars_left ? chars_left : max_size; if (n > 0) |