Skip to content

A bug in data read index #1

@demo-acct

Description

@demo-acct

I think there is a bug here:

sample[c][0] = -1.0;   
   for(i=1;i<=inputs;i++)
	scanf("%lf", &sample[c][i]);

since you started i=1, then scanf should use ("%lf", &sample[c][i-1]). Otherwise the last item will be read unknown memory space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions