Browse Source

compiler: raise an internal error if deprecated message is trying to set to a non clear string pointer

git-svn-id: branches/paul/features@13899 -
paul 16 years ago
parent
commit
4e82976798
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/pbase.pas

+ 2 - 0
compiler/pbase.pas

@@ -325,6 +325,8 @@ implementation
           { handle deprecated message }
           { handle deprecated message }
           if ((token=_CSTRING) or (token=_CCHAR)) and last_is_deprecated then
           if ((token=_CSTRING) or (token=_CCHAR)) and last_is_deprecated then
             begin
             begin
+              if deprecatedmsg<>nil then
+                internalerror(200910181);
               deprecatedmsg:=stringdup(pattern);
               deprecatedmsg:=stringdup(pattern);
               consume(token);
               consume(token);
               include(symopt,sp_has_deprecated_msg);
               include(symopt,sp_has_deprecated_msg);