From 72f8f6677719a8ad7c8e61e4d629f47deef746cc Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 19 Feb 2023 12:20:44 -0800 Subject: deprecate `pub fn cs`, which is an intensely embarrassing bug of a function unlike every other function to test if a particular selector is picked by prefixes, `Prefixes::cs` does not return bool, nor does it check the currently-selected prefix. instead, it modifies the decoded `Prefixes` to set the current prefix to `cs`. this has been a bug all the way since 0.0.1 was released. the function now does nothing, and is marked deprecated. in a future 2.x release, the function will be changed to return `bool` and be in-line with other segment selector-checking functions. in the mean time, a new `Prefixes::selects_cs()` does the correct thing. thank you to @meithecatte who pointed this out in https://github.com/iximeow/yaxpeax-x86/issues/28! --- CHANGELOG | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index b4deece..585fcfa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ ## unreleased * fix incorrect old yaxpeax-arch version selection for ffi crates +* address incorrect behavior of `Prefixes::cs()` + * this "getter" would in fact set the selected segment to `cs`. it has never + actually returned a `bool`, like other selector-checking methods on + `Prefixes`. ## 1.1.5 * fix several typos across crate docs - thank you Bruce! (aka github user waywardmonkeys) -- cgit v1.1