summaryrefslogtreecommitdiff
path: root/ace/Get_Opt.cpp
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-18 21:08:12 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-18 21:08:12 +0000
commit44713a60bcffef33cf09037090428478803763b1 (patch)
tree88cc299f8f3a5bb49ba89a67620f0e03919ff478 /ace/Get_Opt.cpp
parentbea60412cb36fdb5f9a45694cf42cc3823657706 (diff)
downloadATCD-44713a60bcffef33cf09037090428478803763b1.tar.gz
ChangeLogTag:Wed Dec 18 15:03:03 2002 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/Get_Opt.cpp')
-rw-r--r--ace/Get_Opt.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp
index 3f6473b5995..7b6a5511899 100644
--- a/ace/Get_Opt.cpp
+++ b/ace/Get_Opt.cpp
@@ -457,7 +457,15 @@ ACE_Get_Opt::long_option (const ACE_TCHAR *name,
// when the long option is found, but won't allow the caller to pass it on
// the command line (how could they?). The special case is 0, but since
// we always return it, we let the caller worry about that.
+#if defined (_MSC_VER) && (_MSC_VER >= 1300)
+ // For MSVC 7.x, we need to prevent "illegal" character getting into
+ // isalnum, otherwise, it will crash the program.
+ if (short_option > 0 &&
+ short_option < 256 &&
+ isalnum (short_option) != 0)
+#else
if (isalnum (short_option) != 0)
+#endif /* _MSC_VER && _MSC_VER >= 1300 */
{
// If the short_option already exists, make sure it matches, otherwise
// add it.