diff options
author | Hans Bolinder <hasse@erlang.org> | 2013-03-28 10:07:13 +0100 |
---|---|---|
committer | Hans Bolinder <hasse@erlang.org> | 2013-03-28 10:07:13 +0100 |
commit | b90269e836b72e1ceeacbbac697cd16aa529cd31 (patch) | |
tree | 242abc2987473c2821c1a84839de8543f490f190 /lib/stdlib/src/erl_scan.erl | |
parent | a3054e29956b5da4c5b56d83edcd15b6648b3958 (diff) | |
download | otp-b90269e836b72e1ceeacbbac697cd16aa529cd31.tar.gz otp-b90269e836b72e1ceeacbbac697cd16aa529cd31.tar.bz2 otp-b90269e836b72e1ceeacbbac697cd16aa529cd31.zip |
Fix a bug in the Erlang scanner
The scanner did not crash when a floating point number was encountered
in the input string.
Diffstat (limited to 'lib/stdlib/src/erl_scan.erl')
-rw-r--r-- | lib/stdlib/src/erl_scan.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl index 3651f608bc..d988a4d8c7 100644 --- a/lib/stdlib/src/erl_scan.erl +++ b/lib/stdlib/src/erl_scan.erl @@ -338,6 +338,7 @@ string_thing(_) -> "string". -define(DIGIT(C), C >= $0, C =< $9). -define(CHAR(C), is_integer(C), C >= 0). -define(UNICODE(C), + is_integer(C) andalso (C >= 0 andalso C < 16#D800 orelse C > 16#DFFF andalso C < 16#FFFE orelse C > 16#FFFF andalso C =< 16#10FFFF)). |