Skip to content

Couple of edge cases in SourceResource.#288

Merged
jcupitt merged 2 commits intolibvips:masterfrom
adam-vessey:patch-1
Mar 15, 2026
Merged

Couple of edge cases in SourceResource.#288
jcupitt merged 2 commits intolibvips:masterfrom
adam-vessey:patch-1

Conversation

@adam-vessey
Copy link
Contributor

No description provided.

Reading a single `"0"` could potentially be interpreted as a false response per PHP's truth table, resulting in returning a `null`.
Should `fseek()` fail, we probably want to flag the error.

https://www.libvips.org/API/8.17/vfunc.Source.seek.html#return-value seems to suggest that a `-1` would be appropriate to return in such a case?
@jcupitt
Copy link
Member

jcupitt commented Mar 15, 2026

Hi @adam-vessey, thank you very much for doing this!

@jcupitt jcupitt merged commit e2289d4 into libvips:master Mar 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants