mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Fix TOML parsing with large unsigned integers
The parser parses everything as signed integers so the configuration file will fail to parse large numbers that don't fit in an i64. https://github.com/alexcrichton/toml-rs/issues/256
This commit is contained in:
@@ -10,6 +10,12 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### yabridgectl
|
||||
|
||||
- Fixed regression where the configuration file failed to parse after running
|
||||
`yabridgectl sync` caused by
|
||||
[alexcrichton/toml-rs#256](https://github.com/alexcrichton/toml-rs/issues/256)
|
||||
4.0. If you have already run `yabridgectl sync` under yabridge 1.4.0, then
|
||||
you'll have to manually remove the `[last_known_config]` section from
|
||||
`~/.config/yabridgectl/config.toml`.
|
||||
- Fixed issue with overwriting broken symlinks during `yabridgectl sync`.
|
||||
|
||||
## [1.4.0] - 2020-07-26
|
||||
|
||||
@@ -108,7 +108,13 @@ pub struct KnownConfig {
|
||||
/// The results from running the contents of `yabridge-host.exe.so` through
|
||||
/// [`DefaultHasher`](std::collections::hash_map::DefaultHasher). Hash collisions aren't really
|
||||
/// an issue here since we mostly care about the version of Wine.
|
||||
pub yabridge_host_hash: u64,
|
||||
///
|
||||
/// This should have been stored as a `u64`, but the TOML library parses all integers as signed
|
||||
/// so even though it will be able to serialize all values correctly some values will fail to
|
||||
/// parse:
|
||||
///
|
||||
/// https://github.com/alexcrichton/toml-rs/issues/256
|
||||
pub yabridge_host_hash: i64,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
||||
@@ -183,7 +183,7 @@ pub fn verify_wine_setup(config: &mut Config) -> Result<()> {
|
||||
yabridge_host_exe_so_path.display()
|
||||
)
|
||||
})?);
|
||||
let yabridge_host_hash = hasher.finish();
|
||||
let yabridge_host_hash = hasher.finish() as i64;
|
||||
|
||||
// Since these checks can take over a second if wineserver isn't already running we'll only
|
||||
// perform them when something has changed
|
||||
|
||||
Reference in New Issue
Block a user