Image Source: Everett Collection
By the time the Harry Potter and the Half-Blood Prince novel was released, the fourth movie (Goblet of Fire) was on the verge of coming out. This meant that Rupert Grint was already an established member of our favorite magical trio as Ron Weasley, loved perhaps most especially for his gratuitous usage of "bloody hell" to express his surprise, fear, excitement and pretty much any other emotion.
In Half-Blood Prince the pompous (but arguably endearing) character of Professor Slughorn was introduced, whose talent for choosing gifted students to include among his exclusive ranks rivaled his penchant for potions.
So, the fact that Slughorn calls Ron the wrong name isn't all that surprising considering this mistake is made in line with the professor's disregard of students who don't fit his standards of "promising" wizards. Ron Weasley (to Slughorn) was forgettable.
What is notable is the small shout out to actor Rupert Grint when Slughorn slips up upon discussing Ron's incident of accidentally drinking poison instead of a tonic for someone who'd be duped by Love Potion. In the 2005 Bloomsbury edition of Harry Potter and the Half-Blood Prince on page 454, Rowling gives Rupert Grint a subtle nod in the novel by having Slughorn call Ron by the name of Rupert on accident. The tiny detail is easy to miss, but the fact that J.K. Rowling snuck it in certainly makes us smile. See the passage ahead for the mention of "Rupert" instead of "Ron."
Image Source: POPSUGAR Photography / Hilary White