# Hands-On Rust: Wrong multiplier for 8x8 console in main.rs

**URL:** <https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460>\
**Category:** PragProg Customers\
**Tags:** book-hands-on-rust, errata\
**Created:** [27 November 2020 17:43 UTC](https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460 "2020-11-27T17:43:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mikecargal](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mikecargal/32/1289_2.png) [@mikecargal](https://forum.devtalk.com/u/mikecargal)\
**Post date:** [29 November 2020 14:45 UTC](https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460/4 "2020-11-29T14:45:48Z")

</div>

This is embarrassing…

I used DISPLAY\_\* (instead of SCREEN\__) when I set up the simple\_console (since the others used DISPLAY\__. It appears that, when reporting my “issue” I copied/pasted from the book, instead of my code.

In whatever of my defense I might mount, I think that DISPLAY\_WIDTH_4 and DISPLAY\_HEIGHT_4 make a bit more sense, because you’re using DISPLAY\* constants on the other consoles and 32/8 = 4. SCREEN\_\* works (with 2) because there’s already a divide my 2.). And… and… the HUD is more of a DISPLAY thing played over the window into the full screen (THat’s my defense, and I’m sticking to it 😉 )

Of course, all said, your code is correct, and my “issue” was my typo. Deeply sorry about wasting your time.

Arbitrary code critique… I’m at the point now that I bring when I see “magic numbers” in code. (examples are the layer console IDs, the z\_order, etc. I’ve been playing a bit with trying to find good ways toggle them names in my version)

---

_[View the full topic](https://forum.devtalk.com/t/hands-on-rust-wrong-multiplier-for-8x8-console-in-main-rs/4460)._
