forked from eden-emu/eden
		
	service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
CalculateStandardUserSystemClockDifferenceByUser passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments.
This commit is contained in:
		
							parent
							
								
									d95f1ee25d
								
							
						
					
					
						commit
						a2fbcd2831
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -321,9 +321,14 @@ void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser( | ||||||
|     Kernel::HLERequestContext& ctx) { |     Kernel::HLERequestContext& ctx) { | ||||||
|     LOG_DEBUG(Service_Time, "called"); |     LOG_DEBUG(Service_Time, "called"); | ||||||
| 
 | 
 | ||||||
|     IPC::RequestParser rp{ctx}; |     Clock::ClockSnapshot snapshot_a; | ||||||
|     const auto snapshot_a = rp.PopRaw<Clock::ClockSnapshot>(); |     Clock::ClockSnapshot snapshot_b; | ||||||
|     const auto snapshot_b = rp.PopRaw<Clock::ClockSnapshot>(); | 
 | ||||||
|  |     const auto snapshot_a_data = ctx.ReadBuffer(0); | ||||||
|  |     const auto snapshot_b_data = ctx.ReadBuffer(1); | ||||||
|  | 
 | ||||||
|  |     std::memcpy(&snapshot_a, snapshot_a_data.data(), sizeof(Clock::ClockSnapshot)); | ||||||
|  |     std::memcpy(&snapshot_b, snapshot_b_data.data(), sizeof(Clock::ClockSnapshot)); | ||||||
| 
 | 
 | ||||||
|     auto time_span_type{Clock::TimeSpanType::FromSeconds(snapshot_b.user_context.offset - |     auto time_span_type{Clock::TimeSpanType::FromSeconds(snapshot_b.user_context.offset - | ||||||
|                                                          snapshot_a.user_context.offset)}; |                                                          snapshot_a.user_context.offset)}; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Morph
						Morph