Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 1.4k
    • Issues 1.4k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 84
    • Merge requests 84
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #15633
Closed
Open
Issue created Jan 30, 2010 by FPC Admin account@fpc_adminOwner

val() doesn't properly check range.

Original Reporter info from Mantis: marco @marcoonthegit
  • Reporter name: Marco van de Voort

Description:

Bart B. drew my attention to the following issue:

var value : word;
    code : Longint;

begin
 Val('4294901772', Value, code);
   writeln(code);
end.

returns "10" on Delphi, and "0" with a fairly recent trunk. Note the string constant is larger than 65535, the range of word.

Mantis conversion info:

  • Mantis ID: 15633
  • Version: 2.5.1
  • Monitored by: » @flyingsheep (Bart Broersma)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking