tbug816.pp 650 B

123456789101112131415161718192021222324
  1. uses graph;
  2. var
  3. gd,gm:integer;
  4. testimage:array[1..50000] of byte; {this is plenty big}
  5. begin
  6. gd:=VESA;
  7. gm:=$100; { 640 x 400 x 256 }
  8. initgraph(gd,gm,'');
  9. if graphresult<>grOk then
  10. begin
  11. Writeln('Unable to open driver ',gd,' in mode ',gm);
  12. Halt(1);
  13. end;
  14. line(0,0,639,399);
  15. getimage(190,49,257,125,testimage);
  16. { a simple statement, and yet
  17. it throws a General Protection fault, but only with certain
  18. numbers for getimage. The numbers i have here do not produce
  19. too big an image for the array testimage, and yet it faults.
  20. Is this a bug in getimage, or is there something i am
  21. missing here?
  22. }
  23. closegraph;
  24. end.