瀏覽代碼

* fixed web bug #7963 (crash when trying to print the name of a procvar
with too few parameters specified)

git-svn-id: trunk@5591 -

Jonas Maebe 18 年之前
父節點
當前提交
89349c2f1a
共有 3 個文件被更改,包括 17 次插入1 次删除
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/ncal.pas
  3. 15 0
      tests/webtbs/tw7963.pp

+ 1 - 0
.gitattributes

@@ -7756,6 +7756,7 @@ tests/webtbs/tw7679.pp svneol=native#text/plain
 tests/webtbs/tw7756.pp svneol=native#text/plain
 tests/webtbs/tw7756.pp svneol=native#text/plain
 tests/webtbs/tw7817a.pp svneol=native#text/plain
 tests/webtbs/tw7817a.pp svneol=native#text/plain
 tests/webtbs/tw7817b.pp svneol=native#text/plain
 tests/webtbs/tw7817b.pp svneol=native#text/plain
+tests/webtbs/tw7963.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 1 - 1
compiler/ncal.pas

@@ -1799,7 +1799,7 @@ implementation
                         internalerror(200402261);
                         internalerror(200402261);
                       if not assigned(tparavarsym(procdefinition.paras[paraidx]).defaultconstsym) then
                       if not assigned(tparavarsym(procdefinition.paras[paraidx]).defaultconstsym) then
                         begin
                         begin
-                          CGMessage1(parser_e_wrong_parameter_size,symtableprocentry.realname);
+                          CGMessage1(parser_e_wrong_parameter_size,'<Procedure Variable>');
                           goto errorexit;
                           goto errorexit;
                         end;
                         end;
                       dec(paraidx);
                       dec(paraidx);

+ 15 - 0
tests/webtbs/tw7963.pp

@@ -0,0 +1,15 @@
+{ %fail }
+program fpcbug;
+
+{$mode objfpc}
+
+type
+  TCallback = function(const a, b, c: pointer): integer; stdcall;
+
+var
+  Proc: TCallback;
+  a,b: Pointer;
+
+begin
+  Proc(a, b);
+end.