Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

stod causes access violation error #586

Open
Arkyris opened this issue Mar 10, 2022 · 0 comments
Open

stod causes access violation error #586

Arkyris opened this issue Mar 10, 2022 · 0 comments

Comments

@Arkyris
Copy link

Arkyris commented Mar 10, 2022

Sorry if this is the wrong place for this.

I'm parsing out a memo and after a lot of fiddling the only culprit I can find is stod.

 `string_view cpuSV = parsedMemo[0];
  int64_t cpuAmount = stoi(parsedMemo[1]) * 100000000;
  check(0==1, parsedMemo[2]);
  double days = stod(parsedMemo[2]);

  check(0==1, "Here");`

outputs the correct string held in parsedMemo[2]

 `string_view cpuSV = parsedMemo[0];
  int64_t cpuAmount = stoi(parsedMemo[1]) * 100000000;
  double days = stod(parsedMemo[2]);

  check(0==1, "Here");`

outputs access violation

 `string_view cpuSV = parsedMemo[0];
  int64_t cpuAmount = stoi(parsedMemo[1]) * 100000000;
  int64_t days = stoi(parsedMemo[2]);

  check(0==1, "Here");`

outputs Here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant