summaryrefslogtreecommitdiff
path: root/tests/tbs/tb0164.pp
diff options
context:
space:
mode:
authorfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
committerfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
commitf206a9c2b1ae1d8727ca27a96d448b61fdb4c766 (patch)
treef28256ff9964c1fc7c0f7fb00891268a117b745d /tests/tbs/tb0164.pp
downloadfpc-f206a9c2b1ae1d8727ca27a96d448b61fdb4c766.tar.gz
initial import
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@1 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/tbs/tb0164.pp')
-rw-r--r--tests/tbs/tb0164.pp33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/tbs/tb0164.pp b/tests/tbs/tb0164.pp
new file mode 100644
index 0000000000..ea1e754d08
--- /dev/null
+++ b/tests/tbs/tb0164.pp
@@ -0,0 +1,33 @@
+{ %GRAPH }
+{ %TARGET=go32v2,win32,linux }
+
+{ Old file: tbs0195.pp }
+{ Problem with Getimage, crash of DOS box, even with dpmiexcp!! (PFV) Not a bugs, you must use p^. }
+
+uses graph;
+var
+ GDriver, GMode: Integer;
+ w:word;
+ p:pointer;
+begin
+ GDriver := $FF;
+ GMode := $101;
+ InitGraph(GDriver, GMode, '');
+ if (GraphResult <> grOK) then
+ Halt(0);
+ rectangle(0,0,getmaxx,getmaxy);
+ w := imagesize(0,0,111,111);
+ getmem(p, w);
+
+ {---runtime-error!------}
+ { getimage(0,0,111,111, p); }
+ {-----------------------}
+
+ { This is the correct usage (PFV) }
+ getimage(0,0,111,111, p^);
+
+
+ freemem(p, w);
+ closegraph;
+ readln;
+end.